How do I update my app with a new build version? - swift

I already have an app published on the app store but I have made changes and want to submit a newer version. How do I do this? Do I have to make a complete new app version and enter every detail again?
What about the data inside the app will people who used my app lose all the data on the app?

Hi and welcome to stackoverflow. To update an iOS app, you will need to re-use the exact same bundle ID as the previous version and increment / increase the version number. Same applies to subsequent builds submitted to App Store Connect.
1) In Xcode make sure to use the exact same bundle identifier (You can look it up on https://appstoreconnect.apple.com if you can't remember it)
2) Then set the Version to the new version. This does not need to be the exact same as on App Store Connect (which is the customer facing number), but I can only highly recommend using the same to not get confused.
2A) If you already have a build uploaded for the new version, you need to increment the build version as well. (i.e. if you have build 1.0.0, next one can be 1.0.1)
3) Create a new version of your app on App Store Connect. This can be done independently from your work in Xcode and you can even upload a new build even though there is no new version yet.

Any changes inside your build requires a new update for you app.
How do I do this?
First you have to add a new version in AppStore Connect. The only thing which is required is the text for the update i think, the rest is optional(Screenshots etc.).
After that you can upload a new version from Xcode (or Application Loader).
- increase the build number of your build target
- archive your app and upload it to AppStore Connect.
After a while your build is available in AppStore Connect and you can add it to your new version and send it to review.
What about the data inside the app will people who used my app lose all the data on the app?
Files in the documents directory will not be deleted if a user updates your app
Data in the UserDefaults will also not deleted
Files in the cache directory can be deleted every time

Related

How can I submit a new version to the iOS app store without code changes?

I want to change the screenshots of my iOS app. This requires me to create a new version of my app. I created a new version in iTunes Connect, but is there a way to tell it to use the same binary I submitted last time for this?
Alternatively, is there a way to take an archive from the Organizer in Xcode, just increment its version number, and pass it off as a new version?
if you take archive from the Organizer in Xcode than it will give you last build which is uploaded in app store.
That build not contain new version number so you can't upload it.
So its better to increase version number of your app and upload to app store.

iPhone app Update Vs new version

Let's say I have an existing IOS app live on Appstore which is version 1.0
Now I make some changes to the app and want to submit back.
Are there 2 separate ways to submit ?
Like can I still keep the version as 1.0 and just submit the app OR
I need to create a new version 1.1 and then submit it ?
What are the differences in the process?
Also from the customer end, how does this work for new/existing users ?
I have just discovered something about version upgrades and the App Store. Just now, I'm suffering issues and users crashes because of a behavior of iOS system that I can't figure before. And, very important, iTunes, AppStore and iOS have modified some upgrading and installing rules in last versions. Now, it works this way:
- When user install a new version, all the files in the bundle are downloaded and copied in the previous existing bundle, but OLD FILES OR COMPONENTS ARE NOT DELETED (or not all are deleted). So, the final bundle IS NOT equal to the bundle of a fresh installation of the new version.
- For example, if a xib/nib file is localized to different languages for the new version, the updated bundle will include both versions: the one in the root folder and the other one in each localized folder. The system, obviously, will use the first one and only a fresh installation will show localizations for that file.
One of my apps shows that issue with MainWindow.xib and as there are some modifications in references and classes, the updated apps crash each time you try to run as it is using a obsolet object. I have built a new version changing the name of the xib/nib files that have been localized. As MainWindow is one of them, I have to modify the reference in info.plist of course.
OK, knowing that, you can build a new version with complete different components in the bundle that, if files of previous version does exist, the app then offers the user the option of using them. That is, two versions of the app in a single icon and bundle. Not very difficult to do.
BUT, the very weird thing is that I think that new iOS version and iTunes don't allow downgrades. I have tried to do it but didn't get it done. That is, if you install a version, for example 1.2, it is impossible AFAIK to install latter v1.1 on the device nor in iTunes->"Applications". So, the double version bundle will live until a reinstallation of the app.
You need to create a new version number, which makes sense since this is a new version of your app. This will then appear as an update for your customers. I don't think you can upload a new binary with the same version without removing the old one from the store.
You add a new version in iTunes connect, then update the version number in Xcode to match and create a new archive. It's pretty straightforward.
You must always increase the version number of any update to your app.
Users will see a badge on the App Store icon on the device, and in iTunes on their PC. Going into the updates section, it will list your app along with the list of changes you've provided, and a button to install the update. They can also update all apps at once.
NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:#"CFBundleVersion"];
NSLog(#"version is%#",version);
You do not have to open version numbers to submit any longer. Open up Xcode, go to Window - Organizer - Archives and Distribute an app you have created successfully.

Data BACKUP on VERSION UPDATE. App Store

I am a little curious what happens in the situation when the user downloads a new version of application from App Store. I have an existing app, an eBook reader on the iTunes store (downloaded with customers).
Assuming that the customers have downloaded books to the existing version of application onto their iPad, now that a new version is available on app store & user downloads the same along with the app update i want the user downloaded books(on the previous version) to be backed up when a new updated version is installed.
Currently in my application i'm string these books in Caches Directory of Application Sandbox.
If there is a possibility of doing this, please provide some references?
A proper update will not remove the previous content of your sandboxed folders - hence I do not see a reason for a backup. Proper update means the user uses the iTunes update functionality.
Only once the user entirely removes the previous version and then installs the new version, the sandboxed files of the previous version will be gone.

How to test an update process prior to release?

Is there a way to simulate the update of an app from Version 1 to 2?
I am not sure about what happens when I build & run an application in Xcode. I believe that when the app is already installed in the simulator, an update is happening just like it does when the user downloads a new version from the App Store. For example sqlite3 database files remain intact when I hit Bild & Run, while the binary of the app itself gets replaced.
So the question is: Is THIS already a safe way of testing update procedures? What are the alternatives PRIOR to releasing the app and getting dozens of bad reviews?
Unless you change a saved file, it remains as it was. If you really want to test this, then just install the current/old version on a test device. Then build the new version onto the same device. This has the same effect as an update through iTunes for the users.
If you have a separate test team that doesn't have access to the xcode project, they can still test updates using the xcode organizer:
Install the old version of the app on your device and use it a bit to simulate real user behaviour
Install your provisioning profile on the device
Open the xcode organizer and drag the new copy of your app onto the device
That'll keep the existing data intact, allowing you to test the new app with data from the old version.

Upload an app's update to the app store !

I have an app that is already existing on the app store ,But now i made its updates means i updated its UI its OS compatibality and other thing that will make help to run on the newer os now i want to put it on as a update to the existing user of the app and if a user have never this application then it will be a fresh application to him,How can i do that .? i was planning to make its plist version 1.2 but i think it will then not replace the app from the app store and for a new user there will be 2 app for the same build. HOw can we do that .......
You're over thinking this.
Increment your version number.
Log into iTunes Connect. Click on your application. Click the 'Add Version' button.
Go through the steps to submit your latest build with it's updated version. Once approved new users will be able to download it, and existing users will be able to update to it. There will not be two versions on the app store - just one; your latest.
Apple have thought this through for you ;)
If you update your app on the AppStore the old version is removed once the update is approved. The new version will replace the existing one. Your app will not show up in the AppStore with 2 different versions.
Users who have the old version will see an update. New users will only be able to install the newly added update.