How to simulate the AppStore update process on device/simulator - iphone

We have submitted an update version of our existing applications in the App Store recently. But we have received a issue from one of the users, saying that the app is not functioning properly after the update. So in order to replicate the same, what are the steps to reproduce, so that i can analyse the issue?
Any help will be appreciated.

To simulate this before pushing yoru updated version to the AppStore you can:
Download the old version of your app from the appstore
Run the updated version of your app from XCode on the same device.
What will happen behind the scenes is that your app will be updated in a way similar to the Appstore. Your app will be partially updated while your doucments folder will stay the same. (what usually causes problems)
This solution is better because it lets you check for problems before and update was pushed to the Appstore.

Yeah, I get this a lot. The solution is a bit annoying, but you need to keep a history of IPAs you've submitted so you can put the on your phone through iTunes (so not the simulator) and then, run your code on your device putting a breakpoint on your applicationDidFinishLaunching handler in your app delegate, and start tracing from there. You should be able to find the old app store version in your organiser from the last time you submitted, or, go through your SVN/GIT history and checkout the version tagged to your release version.

Many times in the past that has happened to me where I test a new revision and everything looks fine but when I submit an update and is approved, users start complaining about a crash or lost data.
This is way I approach the problem.
(This is most important step) You need to either have your old code or old binary installed on your actual apple device. (Physical iPhone / iPad)
Now go to iTunes and install your new update.
Attach your physical iPhone / iPad to you computer, Launch Xcode and start debugging it.
NOTE: There have been many times when things work perfectly in the Simulator but break on the actual device. Its always important to test your code on the real thing as that is what the users are going to be on.

All that is required is to have the version of the app that is in the app store on your device, then install the updated version to your device. You can debug it using Xcode when you install the new version.

Related

Can't test iPhone app update as an update

I have been working on an iOS app update and am ready to submit it, however I am having a small issue I am concerned about. I create an ad-Hoc version for testing and when I try to synch the update over to my phone via iTunes it won't give me the 'update' option next to the app. The buttons in iTunes says 'remove'. iTunes actually forces me to first remove the old version of the app and only after it is removed, iTunes gives me the option to install the new version and then the app works fine. The only problem is that this is not really testing the update process and I am concerned that once I release the app to the app store my users will have the same issue where they will not be able to just update the app, they will have to remove the old app first and then install the new version. Any idea what might be going wrong here?
iOS takes care of updating Apps, as far as bundle identifier in your info-plist is the same, any newer version will show as an update in iOS. But in iTunes things work differently. You don't have to worry about these things.
If you want to test effects of updating an App, Install the old version from AppStore. Connect your device and Run the project from Xcode. Now this will work the same way as updating your app.
There is no problem from your part. Maybe this time iTunes is not smart enough to know that your ad-hoc version is an update one or maybe the version of the app on iTunes and on your phone is the same. I've made a lot of update to my apps, when you submit a new one to AppStore your user won't face this problem. They will find an update button for your app :).

Test If Version update works fine

Some days back i had few problems regarding the version updates from iOS 4.0 to 6.0 . The entire database was cleaned when the new version was installed .
Is there any way I can test version update before submitting to apple ?
I tested version updates via
Hockey
AdHoc build installed via iPhone configuration utility.
Is there any other way i can test the things so i can be sure that the update will not have any problems?
You can test it via TestFlight service. It's a great tool and I use it often to test my updates.
On a fresh phone (or a phone that does not have your app on it), download the current version of the app from the App Store. Setup all the necessary data, create values in your database, etc. Then update your app in the phone via adhoc release or TestFlight. The key point is to have the most up-to-date public version of your app first.
Try out Crashlytics. It provides instant and detailed crash reports, right down the line # at which a problem occurred.
It negligible in size (a few hundred KB), but even works on release distributions! That means even if you miss a few bugs, you will be notified instantly the moment a crash occurs, rather than having to wait for the useless Apple Crash Reports to be published.
Hope that helps you out a bit.

Apple rejects our latest App

Our latest app was rejected by giving following reason
"when the user launches the app, a blank black screen is produced"
We had tested this many times and did not notice this issue. We tested again now, but it is working properly for us.
Can someone help us to find out the issue?
I don't think anyone can help you find this issue, My suggestion would be to follow up with the Review Team and try to obtain as much information as you can from them. Such as, what device was it tested on, what OS version and so forth.
Ah, the many woes of the app store process.
Make sure that you have tested your app not only on the simulator but also on a physical device.
Secondly the issue might be that you have made some (false) assumptions about the data on the device, that you might have put there manually, but isn't handled when installing anew.
Therefore a plan of attack might be to remove the application complete from both device and simulator and try running them from a fresh install rather than on top of an already installed installation.
Best of luck!
Try to build and install your app from a clean state. You may not be seeing the same as the reviewer, because if you only "build&run" all the time, old files, which are not part of the final build, are still present on your device or in the simulator.
So clean the build folder, remove the app from your device, and try again. Also, check if you app can live without an internet connection.
Your best bet is to discuss this directly with the Apple guys (Resolution Center).

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 get rid of old Localizable.strings?

So I have this app that is already on the app store. To get support for multi language localization we recently changed the localization configuration.
Old configuration:
./Localizable.strings
New Configuration:
./Swedish.lproj/General.strings
./Swedish.lproj/Localizable.strings
./Swedish.lproj/Settings.strings
If I remove the old version and install the new one everything works as expected, but if I leave the old version on the phone when I install the new one, the translations in ./Swedish.lproj/Localizable.strings won't be visible. So it seems to me like the old ./Localizable.strings is still left on the phone, hiding the new ./Swedish.lproj/Localizable.strings. The translations in ./Swedish.lproj/General.strings and ./Swedish.lproj/Settings.strings both works.
My fear is that if we release the update as is the users would be forced to uninstall the app before installing the update to get the translations to work, which would mean that they lose all their saved data. So you can see why this issue has high priority.
If I have understood the cause of the problem correctly, my question is how do I get rid of the ./Localizable.strings already present on the phone? The more general question would be how do I solve this problem?
Are you testing this in debug mode and Xcode is installing the new binary onto the device/simulator or are you doing an Adhoc build-and-archive and then test the update via itunes?
I know that xcode at times will not overwrite files when doing an build and run in debug mode. A touch of the file will not help, but only a clean-all, exit and restart of both Xcode and simulator cures it.
If you are using the adhoc build then the complete app bundle sould be overwritten. If this is not working something serious is at fault.