Testing app upgrade on the iPhone - 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..

Related

How do I release updates to adhoc builds?

I want to release an update to my ad hoc build that exists on my various devices?
UPDATE: I don't mind doing it manually for each device my question is, how do I update the app's without deleting them first off the device. i.e. I want to keep the database on the device in tact...itunes doesn't allow this.
I guess you will have to install a new build on every device via iTunes.
Or you can try TestFlight, it's a great tool. And you can just install a new builds from the device itself. And if you include TestFlight SDK you will be able to get all the sessions and all the crashes of that app(with stacktrace).
Update: use TestFlight. You don't have to delete the app in order to install a newer one. I use Core Data and NSUserDefaults and after installing a newer build nothing is being lost. So I guess it's something you are looking for.
I f you use OTA to distribute your ipas than I think, you can just update those file on your server and if the bundleid and product name haven’t changed, and the bundle version and the CFBundleVersion short numbers are higher than the ones that are deployed, its should update the deployed apps. (I am not 100% sure about it though)...

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.

Problem in updating app on iPad

I created an app for iOS 3.2 for the first version 1.0.
Recently I created an updated app for iOS 4.2 with print feature etc. for the second version.
My problem is that, the users are not able to update the app from appstore.
They are facing issues like data loss of version 1.0 app, crashing etc.
Can someone explain me what can be the reason for this?
And, how can I test this thing on my device, as I am not having the version 1.0 app from appstore, but the code for both versions.
Delete your new one on your test device and install the old one. Then build and debug the new one line by line. I had lots of trouble my first time through due to confusion over the update/migration process of core data. If you use core data, chances are your existing customers have an out of date store DB that your new code is crashing on. The store doesn't get wiped in an update if it's in your user's document directory... Only the one in the app bundle. You'll need to handle that reset or tell core data to migrate it to the new model. Of course, all this is speculation since you've given almost no details about the problem, frameworks used, log files, etc.
During a normal install process, data should not be overwritten. NSUserDefaults and files should remain during an upgrade, as long as the user doesn't delete the app first. I assume the crashing occurs after the new version is installed?

Check whether app updates work without submitting to App Store

I have an application already on the store and would like to release an update. Since my app deals with databases and I've had to change some parts of it, I would like to ensure that the update does not affect the existing functionality in any way once the user updates from the App Store.
What I did was this - install the first version of my app on my device. Changed the update's version in info.plist to 1.1 and run it via xcode (and install on my device). But what happens by doing this is some of the changes I made to the XIBs do not show up. It looks as if the app was only half-updated (if you know what I mean)
Is there any way to update an existing app programmatically without having to go through the app store and then find out it could lead to a disaster?!
Thanks for any help!
I would double check your build configuration. Between building the two versions of the app, I would recommend a "Clean All" just to be safe. The process you described works to verify updates. The only other alternative I can come up with is to create Ad-hoc distributions of both versions of your app, and install those.

How can simulate the IPhone app upgrade process in the SDK simulator

I'm working on an iPhone app and about to release version 2. We'll be changing the core data model and I'd like to simulate the upgrade process in the simulator before releasing it to users and potentially causing data loss for them. There doesn't seem to be any real good doucumentation on how to do this in a sandbox before releasing it.
The process I've used in the past has been to wipe any working version from the Simulator, check out the previous version of my application from my repository, compile and install that, work with it for a bit, then compile and install the new version of the application. The installation of the new version should simulate the upgrade process, where you can test your data migration to your new model.
I also repeat this process on the device to make sure no problems are encountered there either.
there are some cases that cannot be simulated in Xcode. Look at this Apple page: https://developer.apple.com/library/ios/technotes/tn2285/_index.html
You have to create IPA file and simulate update via iTunes.
I agree with Brad's overall approach. To save a little time, I would just save the sample set of data that you create with the older version of your app. This way you won't have to keep recreating the sample data set if things don't go right. You will just simply copy the sample data set back into your app's directory in the Simulator.
Your app's directory is located at ~/Library/Application Support/iPhone Simulator/User/Applications/A GUID for your App on your development machine.