We have received reports from a number end users regarding issues with updating from one version of the app to the latest version in the App Store. This article will describe the identified cause and the steps we have taken to eliminate the issue in future updates.
Some end users reported that a black screen was displayed when upgrading the app to latest version. Closing and reopening the app caused the app to shut down in some cases. Especially end users with many downloaded newspapers were affected by the issues.
We suspected that the issue had to do with the automatic migration of the users’ database of downloaded newspapers. When a new app version is released, there is often a new database model included in the app. The migration can take a while depending on the number of downloaded newspapers and the speed of the iPad/iPhone. Apple has set a limitation that an iOS app must finish launching within 10 seconds. This created the situation that some end users experienced: the app terminating after appearing to ‘hang’ with a black screen for 10 seconds.
Now this situation is already a known fact - and naturally we have code to circumvent this issue. But what we recently learned is that it is not possible for us to detect with 100% certainty when 10 second limitation is in place. This means that our current code for circumventing the issue could never become fool proof. We found out that we needed a different solution entirely.
After learning this, we have re-structured the code to navigate around these limitations, and in case the database needs to be migrated to a new data model version, this will always be handled gracefully - with a clear explanation of what is happening shown to the user while the migration is taking place.
As an example of the new data migration feedback, we have taken an app with 100 downloaded newspaper editions. This database takes up 39MB of space inside the app - and it contains 14000 unique newspaper articles as well as 8000 article images.
On a new iPad Air, the complete database migration only takes 4 seconds, but on an original iPad 1 running iOS 5 the same process takes about 40 seconds. While the data is being migrated, the user is now being informed of this fact with a dialog similar to what can be seen in this screen shot:
We now have a fully working solution for all future updates that eliminates situations where the app displays a black screen and shuts down. With clear explanation of what is happening while the app is updating, the end user will no longer be inclined to try and delete and reinstall the app and thereby risk losing downloaded newspapers.
Should you have any questions or concerns, please contact email@example.com