Does this objc code “shouldRestoreSecureApplicationState” restore app state when app is updated?

I have this code in appDelegate for an app game that's on App Store recently -


- (BOOL)application:(UIApplication *)application shouldSaveSecureApplicationState:(NSCoder *)coder {

return YES;

}


- (BOOL)application:(UIApplication *)application shouldRestoreSecureApplicationState:(NSCoder *)coder {



return YES;

}


Is that code ok as it is?


I understand that code preserves game states between sessions. But will it also preserve the game state when app is updated with a new version or new iOS?

Or is there some other code for that?


Thanks for your help

AFAICT, that's OK.


have a look at thgis if you test in simulator.

https://stackoverflow.com/questions/58889713/how-can-i-get-app-state-restoration-to-work

Thanks for your input. Took awhile but found out that every view has to be set up for save and restore. Buttons, tiles, etc. So it's all good now.

Does this objc code “shouldRestoreSecureApplicationState” restore app state when app is updated?
 
 
Q