hi,
I have around 100 plists in my application and I am planning to move that to a sqlite database. Is there a way to insert all these 100 plists into the database during the 'build' and make it available in the application after installation ?
hi,
I have around 100 plists in my application and I am planning to move that to a sqlite database. Is there a way to insert all these 100 plists into the database during the 'build' and make it available in the application after installation ?
If you are able to do it with a shell script, you can add that script to the build phase in xcode. You can handle plists via command line with PlistBuddy, and surely there is some command line tool for sqlite, so it should be doable.
The best answer is to create a command line Core Data application that loads up those plist files and saves out a sqlite file. You can then take that sqlite file and include it in your iPhone application.
The sqlite that Core Data generates should be considered a black box and therefore should only be edited by Core Data. It is far easier to write the Core Data command line app then it is to try and reverse engineer the core data store plus you are future proof whereas designing your own sqlite file outside of Core Data will break at some point.