If I have an app that preloads a database when it first launches, is there a way to then in future publish an update only version for the app?
(IE excluding the preloaded db file so the update isn't bigger than necessary as an existing user wont ever overwrite their preloaded db - but at the same time being able to publish one WITH the preloaded db so that new downloaders will get a newer version of the db)
If there's an alternative way to approach it please let me know. Just to clarify, the app automatically updates the db with data when used - that's why I have no need to include the preload for every app distribution for users who have already downloaded.
I've looked on Google and can't find an answer - but maybe I'm just not using the right terms!
When you create an update to your application, your app will need to check if the user already have a database in the Document folder. If one doesn't exists, your updated app will copy the default database from the Application Bundle.
Also, if you add features to the app, new table or columns to your existing database schema it would be nice to use Core Data Model Versioning and Data Migration.
Excerpt from Apple Docs - Reducing Download Size for iOS App Updates:
Starting with iOS 6, the app store will automatically produce an update package for all new versions of apps submitted to the store.
Related
I want to change my bundle ID (just make it lowercase) because the bundle ID I set up in App Store Connect is all lowercase, but my old bundle ID in Xcode had an uppercase letter. Changing it in Xcode is straightforward, but when I run the app on my device, it installs a duplicate app instead of replacing the old version (because the bundle IDs have different capitalization). I'm using Core Data for my data persistence, and since I've been testing the app on my own device for a while and adding data through that, I would really like to keep the data I have but migrate it to the app with the new bundle ID.
All the related questions I've found so far are concerned with only changing the bundle ID, but not with maintaining the existing data. Is there a good way to do this?
If you change the bundle ID, then it's a different app, as far as iOS is concerned. You have two different apps that happen to have similar bundle IDs, but they can't access each other's data any more than any two random apps can do that.
If you have not released your app, meaning it's still in development, you can copy data out of the old version and then upload it to the new version. You would use almost exactly the steps in this answer except that in your case you wouldn't delete the app until you were sure the copy was working normally. With these steps you basically copy the data from one version to your Mac, then copy it from the Mac to the other one.
If you have already shipped your app, it's more complicated. One way would be to update the app using the old ID but enable app groups. Have the update copy its data into the shared app group folder. Then enable app groups with the new ID and have it use the same shared folder. Another approach would be to have both versions sync data via some online service-- CloudKit, or Firebase, for example-- so that when the app gets the new ID it will get the new data by syncing it in.
I am about to submit a new app through itunesconnect. I read a couple of renaming questions (How to rename your app in itunesconnect?), but I have a more detailed question: would the user generated data migrate into the renamed version when I renamed it or would it start off from scratch again (this is exactly what I worry about - user data would be gone).
The user data is stored in the app container. The container ID is determined by the bundle ID. You're fine.
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).
I have an iPhone app that loads data from 100 different text files. I would like to know if I am able to update and manage those text files when they are in the AppStore. Something like that I have a user named John, but I want to change his name. Can I do this when the app is in the AppStore?
Also, is data in sqlite databases manageable when submitted ?
That depends on where the files are being loaded from. If they're resources built into the app, then no, you can't change anything without resubmitting the app. But you can, of course, change files that your app loads from a server.
A common way to deal with this kind of situation is to include the most up-to-date files you have in your app, but build in the ability to retrieve newer versions from your server. Then, as you make changes and post them on your server, your app will update itself.
Well, that depends. You cannot change any part of the app bundle when it is on the App Store without resubmitting a new version and having it go through the review process. You can however have your app download files from a server and use those in your app. Then just update the files on your server to be whatever you like.
I'm going to need to update my iPhone app on the app store at some point.
I’m using secure storage functions (s3eSecureStoragePut) for save data that creates an appdata.i3d file.
When I update the app I want to preserve the players save data, how can I ensure this done?
s3eSecureStorage is a bit misleading, it is not secure and this is a historical name related to the Brew and Symbian platforms. Essentially all this is doing is writing to a file so it will be preserved on app updates assuming you don't write over it.