There is no easy, one-size-fits-all approach to this. In general, these are the steps you'll want to follow:
- Identify the entities represented in your existing database
- Identify their relationships with other entities, as well as their attributes (these will probably be the foreign keys in your database and the normal columns, respectively).
- Create a Core Data model that corresponds to the entities, relationships, and attributes that you have identified.
- Using the SQLite library on iOS, write code to query your database. Use the results of your database queries to instantiate
NSManagedObject
s and populate the attributes and relationships that you identified earlier.
Unfortunately, there will be no way to avoid writing some code to interact with your existing database. If you wish to avoid writing C code to do so, you can check out an Objective-C library that provides an interface to the SQLite routines that's more object-oriented called FMDB.
monkees songs rail gun harrisburg top chef texas great pacific garbage patch ben affleck and jennifer garner google privacy changes
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.