iOS - Populate DB with java outside the app
I would like to write an application for iPhone/iPad which will use a database. This database is 开发者_如何学编程populated by a third party server so I would like to know what is the best method (SQLite,...) if I just want to drag/drop the database into my app. The database might be big so I don't think XML would be good.
What do you think?
Enable iTunes File Sharing for your app by adding UIFileSharingEnabled
to it's Info.plist and setting it to YES
.
Then write your app with a mock DB in place. Put the mock DB into the documents folder.
Every time you want to update your DB, simply connect your iPhone to your Mac, open iTunes, got to file sharing and drag-drop the new DB into the sharing window. This will overwrite the old DB without you needing to rebuild or reinstall.
精彩评论