Preventing erasure of user data while upgrading iOS application via iTunes - ios

I want to upload a new beta version of my iOS application for beta testers group. Users save their data in the Documents folder. What do I need to do in order for users to upgrade their application without losing their data?

The Documents directory is not overwritten when you update an app so as long as your data is compatible between versions, you shouldn't have to do anything special.
Alternatively, for developers, Xcode's Organizer allows you to extract the contents of an apps Documents directory easily.

Downgrading iTunes to 7.7 seems solved the problem on Windows

Related

Updating iPhone app removed the older version data

I am developing a social application for iOS using Objective-c. But when I published the newer version of my app and upgraded it using App Store, all of my older application data has been removed while every thing in both versions is the same like Bundle Identifier, Provisioning Profile, Signing Certificate. But I am confused why some thing like that happened. I was wondering if anyone could help me. This is too important for me, because this problem forces users to register again in the application.
update: I save data in the documents and also using core data
It might not be cleared just the path of the files changed, for example lets say you save the path of a photo like this :
/data/Containers/Data/Application/B42FE84A-E031-4A2C-AEA7-8D77AEAA389C/Documents/Photo.jpg
when you update the app the path will look like this because iOS will change app documents folder
/data/Containers/Data/Application/757455E1-355B-4040-8ABB-85F39D650A1E/Documents/Photo.jpg
so the file still exist but the path have changed and since you are saving the path the app won't find it because it was changed
i recommend saving only file name not the whole path

Sqlite database and app upgrade process doubts

We have stored our app sqlite database in the Library folder. We need that for future app upgrades from app store, the database included in the upgraded app to delete the database from the installed one when users download it from app store. We have checked from different sources, and they say that only the content in Documents folder will not be deleted.
Please can you confirm this point?
Thanks
The Library folder will survive an app upgrade. It's possible that Library/Caches will be deleted but not Library in general.
The simplest solution is to have the new version of your app use a different filename for the database file and have code that looks for and deletes the old database file.

Backup and Restore sqlite db during new version release

I am working on an iPAD application. When a new version is released, I add the version number on the server side db and call it through a webservice and check with the build version of the app. If there is change in the version I am calling a URL to install the new version of the app. What will be the possible solution, not to lose my data from the iPAD app and once the new app is installed I use back the same sqlite db. FYI... I am not using any MDM, and installing the app through an URL. Let me know if I need to explain more in detail.
In the past, app version update usually reset the data to the bundle as packaged in the archive (ipa). The user data in the databases then become lost. (Note: this may have changed in IOS 7 because of the announced incremental update options but I have never been able to check it out).
My way around this is to provide a backup restore facility that creates a Plist in the /Document Folder. this allows the user to extract his data through iTunes File sharing, then restore it back if he or she wishes. If you have a server though, a better way would be to create folders for registered users and program the facility to back / restore from the server. Prompt the user to use the backup prior to any update, and prompt the user to restore data from the server (if available and the database is empty).

Sencha Touch + PhoneGAP Build - iOS App rejected because of Storage setting

Experts,
Recently I've used PhoneGAP Build service for my iOS App (HTML5 App built using Sencha Touch), and when i submit to app store, they rejected my app with this reason
in particular, we found that on launch and/or content download, your
app stores non user-generated content in iCloud backup directories. To
check how much data your app is storing:
Install and launch your app
Go to Settings > iCloud > Storage & Backup > Manage Storage
If necessary, tap "Show all apps"
Check your app's storage
Is there any solution?
please help
I already have this app published in BB and Android with out any issues.
https://play.google.com/store/apps/details?id=com.pavan.cinetalk
http://appworld.blackberry.com/webstore/content/32189889/
I think PhoneGap Build might be setting BackupWebStorage by default to iCloud, if you set up PhoneGap locally this setting can be changed in the Cordova.plist file see the below link:
http://docs.phonegap.com/en/2.2.0/guide_project-settings_ios_index.md.html
If im not wrong the message is quite clear, they just don't want you to upload to their cloud data that is not generated by the user.
I don't know your app, but sounds like are you backing up things like images or media used by the application itself instead of user's data ¿?
#Brett Bailey: Thanks for your input, finally this parameter worked and iTunes approved my app now
https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=687594497&mt=8

IOS Enterprise Distribution update keep user data?

I'm making an iPad app which will be distributed from my own web server using Enterprise Distribution Program.
The app itself checks for a newer version on the server and calls itms-services in IOS to update itself. This works perfect.
The app bundle contains a directory with resources like images and movies.
Apple claims that updates will keep the users data if the bundle-identifier is the same.
From: http://help.apple.com/iosdeployment-apps/mac/1.1/#app43ad802c
If you want users to keep the app’s data stored on their device, make sure the new version uses the same bundle-identifier as the one it’s replacing, and tell users not to delete their old version before installing the new one. The new version will replace the old one and keep data stored on the device, if the bundle-identifiers match.
When running the app from Xcode directly to my connected iPad, I can remove the folder with my resources, run the app again, and the folder remains in the bundle on my iPad.
This behavior is what i look for. I'm planning on adding more folders with new resources with new updates. Since the resources are quite heavy, I don't want users to have to download bigger and bigger archives. I want to add just the new stuff.
The problem arises when I make a new archive without the folder and update the app from my web server as users would. Then the folder seems to be deleted.
Any experience with this?
The bundle that you install is always overwritten by the new bundle that you install. The user data referred to in the documentation is the data stored in the Documents and Library folders of the file system. If you wish to be sure that the old bundle files will always be available, you can copy them from the bundle to the Library/Caches folder of the application.
One thing worth mentioning is that the way to ensure that the ad hoc installation overwrites the current bundle is to make sure that you change the bundle version.
hope this helped :)

Resources