How to test local storage persistence after iOS App Store update? - ios

At one point there was an AIR bug (3.5) that changed the location of the LSO storage, causing local SharedObjects to be "lost" after an app update. Apparently this issue was resolved in 3.6 and life goes on.
At this point I don't have 100% confidence that any user data stored in a SharedObject on an iOS device will persist after an AppStore update, and I would like to be able to test this out prior to actually submitting the update to Apple.
However, my experience has been than whenever you test/debug your app and a new IPA is generated, the old app is completely wiped, including all of its data. So there's no way that I know of that I can test an update of the app against an older version to ensure that the SharedOjbects remain accessible and working fine.
Are there any solutions? Or can anyone who's using LSO for persistent App data storage confirm that they've pushed an update through the App Store and retained saved user data?

Related

Is it possible to retrieve deleted iOS simulator app data?

I've been working on an iOS app and making lots of progress on tweaking a sqlite DB. Using FMDB to interact with the DB, the copy I was working from was the one copied into the simulator app's bundle, not the version that sits in Xcode. I accidentally deleted the app from the simulator, and with it several days of progress on this DB I've been working on. Is there anyway to get that data back? Where do deleted simulator apps go to die?
It won't be possible to get anything of deleted application until and unless you are storing it to permanent storage i.e Keychain.
So, It's not possible to get the DB file for your previous installed application.

How do you create a new version of an app for testing with updates (iOS)?

I'm fairly new to app development, and I just recently put my first app in the App Store. I noticed some bugs after it was released, and when I tried to test it, it overwrote the version I had downloaded from the app store. I have the app connected to Game Center, so I want to avoid setting a high score while I am testing. Normally, in the test version I am logged out, and it has my ID saved for the App Store version, so it auto logs in for that version. However now that the new version has been overwritten, I can't login at all.
How do I keep them separate?
Change the bundle id like com.company.game to com.company.game2 or so

Blackberry app version update deletes persistent store object on some devices

I have a Blackberry app that stores an object in the persistent store. After updating the app, it is supposed to read the existing value from the persistent store, if any, and continue to use that value. This works on some devices, but does not work on others. I tested on several devices running OS version 7, all of which work as expected. However on a device using version 5 and another using version 6, the object is no longer readable in the persistent store.
This is the case even if I don't change anything about the app other than the version number. Same exact class/object being saved & loaded from the persistent store, and same object ID used to access it.
The process I'm following to reproduce this is:
Completely delete the app & all it's data using the command line.
Load a version of the app, by downloading a .jad file from a browser, verify that it stores data in the persistent store.
While the app is running in the background, load a later version via browser download of the .jad file.
After downloading the later version, the system asks if I want to replace the previous version, and I confirm that I do.
The system loads the new version, and prompts that I must reboot for the change to take effect. I select "Reboot".
Device reboots. The later version is running but cannot read the object from the persistent store.
A device on which I can consistently reproduce this issue is a Blackberry 9800 (Torch) running 6.0 Bundle 2647.
As mentioned above this only happens on some, not all, devices, which makes me think something other than a coding bug may be going on here.
Anyone have ideas about this issue or how to debug it further?
Peculiar case.
Are you sure the persistent storage is being committed? Something similar generally occurs for me when data has been stored in the storage but not committed. If that is the case, and you load the older version, store some data and reboot your device, the data will not be stored in persistence.
You mentioned that the app is still running in the background when you load a later version. You may want to check whether commit() gets executed or not.

Do files in NSDocumentDirectory transfer when user upgrades iPhone

I have an app that saves user entered information to the NSDocumentDirectory. On issue that people are having is when they upgrade their iPhone to iPhone 5, the information in their old NSDocumentsDirectory are not being transferred over, even when they select the app to be transferred over.
Users end up loosing all their entered data when they upgrade.
When users upgrade the app on the same phone they do not lose their data. It only happens when they upgrade to a new iPhone.
What is the way to correctly save User data and make sure it is transferred over when the phone is upgraded?
Data is only transferred to a new device if they choose to do a full backup of the old device and then choose to restore that full backup to their new device. Simply transferring apps results in fresh installs of the apps with no data.
This has always been a major problem with iTunes (and now iCloud backups). There is no way to backup a single app and its data and there is no way to restore a single app and its data. Only the app can be restored but no data unless a full device restore is done.
All of my apps have their own built-in features for backing up and restoring its own data. This allows users to easily transfer data between devices or deal with them messing up their own data by mistake.

Is it possible to retain data of the older version if a new version of app is deployed on device?

I am new to iOS development so my question may be n00bish.I am working on an app for iPad which downloads PDFs and stores on the device(iPad) in the Documents directory so the user can still read them if he isn't connected to WiFi. My question is:if a newer version of the app is available and the user installs it, will it delete all the data(documents,in this case) from the device? If yes,how do I prevent the old data from being deleted? I am using CoreData in this app(if this helps)
When a user installs an updated version of any app, the app's sandbox is kept intact. Only the app and its resource bundle are replaced. So basically, anything you have stored in Documents or Library will be kept intact after the update process. There is no guarantee that files in Library/Caches or tmp will be kept but those should only have transient files anyway.

Resources