Reputation: 47348
I have an app that I've built a few months ago and would like to continue upgrading that app.
Since that time, the app has about 6 months of data, and I would like to backup the state of this app before working on upgrading the app (I'm afraid that I will somehow delete/mess up the core data persistent storage if I install a new version of the app.) I do not remember if I got the app from the iTunes store or xCode installation.
I've backed up my iPhone using iTunes and am currently working with an app which has a different app identifier from the production app:
There are two versions of the app on the device.
I would like to see how my changes that I've created for the app_test would look on the live production app with real data.
Is it enough for me to change the xcode's project bundle id from "app_test" to "app" to see changes in production?
Thank you for your input, I really value that data and do not want to lose it!
Upvotes: 2
Views: 409
Reputation: 309
First important point - do not change your "app_test bundle" identifier to "app" - this will overwrite your live app on the phone, and your data will be gone (well, you'll have to restore from backup at least...)
You should be able to use an OSX program such as 'iPhone Explorer' to browse your connected phone - find your app, and see if you can nab the .sqlite file (maybe in the documents or libray folder of your app) - copy it to your desktop.
Now you've got your live database, you have several choices. You could also nab the app_test database, and merge the contents using your favourite sql tools - or import the live .sqlite file to your app_test xcode project, and tell app_test to use that as the data source.
If you need write access to the database, you'll have to copy the live .sqlite from your app_test bundle to the documents or library folder first.
Upvotes: 1