Not able to update existing application using Itunes - iphone

We have developed the iphone application version 1 and installed it in the iphone device when i try to install its version 2 or its updates via itunes than it doesn;t syn with the iphone and the run the last app that have been installed and i think it picks up from cache
i want it in a manner that it overwrite the app over on the last version and pick updates from second one that the data can be retained between the both of the the versions using itunes .
Let us know how to update previous version app with new version app using ITunes.
Thanks
Balraj

Did you remember to bump the version number in the .plist file? iTunes doesn't use the file date to decide you have a newer build, it apparently checks the version number of the app bundle.

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

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.

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.

Testing app upgrade on the iPhone

Say I have app version 1.0 released on the app store. Then I want to release version 1.1.
I will keep existing data that was copied out of the app bundle and into the app's sandbox. These are some XML config files and a sqlite db the user can write data to. These files could need updates that preserve their existing data.
What is the best way to test an upgrade scenario?
Is there any kind of delegate event that is only called on install?
Thanks.
I think testing with AdHoc versions that is dragged dropped in iTunes is a similar upgrade situation.
That's how I tested upgrading our Chess game, so it keeps old and current games on the device.
As for the files/DB I suggest they should contain some version number.
You can use TestFlight for beta testing or preproduction testing.. visit TestFlight.com for more information..