State restoration is disabled by default in applications. To enable state restoration, you must opt in within the application delegate.
Open BNRAppDelegate.m and implement the two delegate methods to enable state saving and restoration.
@implementation BNRAppDelegate - (BOOL)application:(UIApplication *)application shouldSaveApplicationState:(NSCoder *)coder { return YES; } - (BOOL)application:(UIApplication *)application shouldRestoreApplicationState:(NSCoder *)coder { return YES; }
When the application goes into the background, its state will attempt to be saved, and if the app is launching fresh, its save will attempt to be restored. To understand what gets stored, we need to discuss restoration identifiers.