Testing your app as an "Update"

Hey guys,

I am finishing up a big update to my app.  I have some concerns with how my app will react when a user that has the old version installed updates the app to the new version that I will release.  I have in app purchases and unlocked content, which I need to see what happens to it when this update is applied.

If I’m not mistaken, when an update happens, all content in the “system.DocumentsDirectory” is left alone and is usable in the updated app. (I use ICE to save what content is unlocked, and ICE should be in system.DocumentsDirectory)

I would like to test this, but how can it be done?  Any time I want to test on device, I have to uninstall the app from the device, and install a fresh new copy of the updated app. (This deletes all DocumentsDirectory data)

Is it possible to have the old version of my app on my device, and then do an “update” with my new version without it actually being live and published to the app store?

Hi there,

Yes, you’re right about what happens on an update – the Documents Directory (as well as the Caches Directory and Temp Directory) don’t change, but the Resource Directory gets overwritten with the resources from the updated app.

It’s actually not hard to test.  Do you have a developer build of the first version of your app?  Or if not, do you have the source code for it, so that you can build a developer version?

Once you have a developer build of the first version, install it on your device.  Then, prepare a developer build of the new version.  If you’re on iOS, just drag it onto your device in the Organizer window like you would normally.  It’ll prompt you whether you want to replace the app you already have name.  Click OK, and it’ll install the new version just like an app update would.  If you’re on Android, you can install the app using adb and the -r parameter with the command ‘adb install -r yourapp.apk’.  The -r will overwrite any existing version of the app on the device, again, like an app update would.

Hope this helps.

  • Andrew

Andrew,

thanks for the response.  I’m glad that it is easy to test.  I have been using the “iPhone configuration utility” which just lets you uninstall or install apps, so I will give xCode a try.

Sounds good.

There may be a way to do it in the iPhone Configuration Utility too, but I haven’t tried it myself.

Hi there,

Yes, you’re right about what happens on an update – the Documents Directory (as well as the Caches Directory and Temp Directory) don’t change, but the Resource Directory gets overwritten with the resources from the updated app.

It’s actually not hard to test.  Do you have a developer build of the first version of your app?  Or if not, do you have the source code for it, so that you can build a developer version?

Once you have a developer build of the first version, install it on your device.  Then, prepare a developer build of the new version.  If you’re on iOS, just drag it onto your device in the Organizer window like you would normally.  It’ll prompt you whether you want to replace the app you already have name.  Click OK, and it’ll install the new version just like an app update would.  If you’re on Android, you can install the app using adb and the -r parameter with the command ‘adb install -r yourapp.apk’.  The -r will overwrite any existing version of the app on the device, again, like an app update would.

Hope this helps.

  • Andrew

Andrew,

thanks for the response.  I’m glad that it is easy to test.  I have been using the “iPhone configuration utility” which just lets you uninstall or install apps, so I will give xCode a try.

Sounds good.

There may be a way to do it in the iPhone Configuration Utility too, but I haven’t tried it myself.