When a user launches an iPhone app it’s really important to give them a consistent experience. They should be able to trust that the app is going to allow them to accomplish the task they have set out to complete. Throwing them into a saved state from three days ago is jarring and tedious to unwind. App developers need to be aware that users will sometimes be in a hectic environment with time constraints. A user correlates the app icon with solving a problem they have, not displaying the solution to the last problem they solved.
Before iOS 4 many apps didn’t have this problem. State saving wasn’t part of the OS, so most apps launched in a blank slate state. Some apps had started using URL based Navigation, as popularized Facebook’s three20 framework, as a way to save state. Apps using this method to preserve state often fall victim to placing their users in a deep location within a navigation tree with no way to escape. Facebook for iPhone attempts to solve this problem by allowing the user to tap the Facebook logo to return to the home screen. However, this isn’t a standard UIKit action, so most users don’t know it exists.
After iOS 4, almost all apps suffer from this problem. If the application is complex enough to have multiple levels of depth in a Navigation Controller, then it will suffer from this problem. The problem goes away once the app is killed in the background, meaning that apps with a larger memory footprint suffer this problem less. For example, your state in Tiny Wings is only saved for a short period of time before it is killed because it uses so much memory. On the other hand, Twitter for iPhone will hang around in memory much longer because it has a comparably smaller memory footprint. However, since Twitter for iPhone uses URL based Navigation, it still suffers from this problem even after being killed in the background.
The solution is Temporal Awareness.
Apps can easily record the last time they were closed or lost focus. If the app then checks this time when it is next launched, it can tell how long it has been since the user last used it. If that time is past some constant, say a few hours, the user state should be cleared and they should be presented with the main screen with empty input fields.
If the app in question requires the user to enter more than a few values, a flight booking app for example, then a history view should be employed if the user wishes to return to a previous query. The app should still launch on the main screen with the user input fields blank.
Games should always save the state once they lose focus. They should still make use of Temporal Awareness to decide how to present the saved state to the user. If it has been less than a few hours, simply putting the user back into the game with a resume button is fine. If it has been longer, then presenting them with the main screen of the game, but with an option to continue from their last session.
How many times have you opened the built-in Maps app only to find that it is on a detail screen from a business you looked up weeks ago? Preserving this level of depth into the app would have been incredibly helpful if this was half an hour after you began planning the trip. Maps saves its state to disk because it was created long before iOS had multitasking. This was a nice stopgap, but it should be updated to be temporally aware.
After a few days of iPhone usage, you’ll end up with many pages in Safari that aren’t relevant. Since Safari is saving these URLs to disk, you will eventually be required to close them all by hand. What’s worse is Safari’s behavior once you close them all by hand and then return to the app later. The bookmarks modal view is displayed, requiring the user to dismiss this view if they just wanted to search Google or open a website that wasn’t bookmarked. Safari should be aware of the last time the user made use of the app, and display a startup view accordingly.