iPhone app Update Vs new version - iphone

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.

Related

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

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

Application size doesn't reduce after deleting bundle content

I have an iphone application with custom bundle in resources with hi-resoultion photos (sized about 150mb). I need to reduce application size, so i do an update and remove this bundle from resources, but when i apply new update on installed application, its size remains the same.
Is it possible to "update" application resouces after update from appstore?
Solved my question.
The problem was that installing application directly from xcode to the phone didn't act the same way like installing a new app version from appstore. The version on the iphone kept old resources in bundle after installing via xcode. But I emulated situatuion like "appstore new version install" using TestFlight. I made 2 different version with diferrent bundles and installed one after another. The size of app changed! The problem was solved.
Maybe it was some bugs - stangely cleaning, removid derived data, didn't help at all.

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.

How to reinstall the iPhone app in ad hoc distribution

I am using ad hoc distribution for my iPhone app. It works very well. The only problem is when I update my app or create a new binary and want to install this new version on device, I need to delete the old version. Like although I drag and drop the new version in iTunes application, it does not over write the previous version even after I do sync. It might be becoz the app already exists in the device. So I need to delete it to reinstall it. How do I make sure the app gets updated to the new version and I dont loose the data from the previous app. Data I mean the database. Please note I am just formating the UI and not even touching the database.
I've found that you must increase the version number in your main plist file for iTunes to install a new version of your app.

Installing application on iphone it override on the last application

When I am installing new application on iphone, this current application get override on the last application,so we can not maintain the previous application.
Please help to solve this installation problem.
If you change the app identifier in info.plist you can have a different version on the phone at the same time...
However, do you really want to do that? Most apps migrate by loading a new version, but then updating the old database or preferences to work with the new version of the application. Just because your application is replaced does not mean the data the user created is replaced.
If you change the Product Name in the build settings, that directly affects the name of the .app bundle. You can have two copies of the same app, as long as theyhave different names - this can be helpful for testing a new version while preserving the old, stable version.
As Kendall says, you probably want to use the same name for newer released versions of the same application.