Saving application state
When writing applications for iOS, you should anticipate that the app may at any point be closed. This can happen for a number of reasons such as the user deliberately exiting from the app, an incoming call being received, or iOS closing the app due to memory constraints.
When an app is closed unexpectedly, the user will expect it to resume from its previous state when they eventually return to it. For any Flash projects you are porting to iOS, it is important you add functionality to save the app's state at convenient points throughout its lifetime.
This recipe will take you through the steps required to maintain the state of an application. We will use Flash's SharedObject
class to save data locally to your device.
Getting ...
Get Flash iOS Apps Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.