I am trying to use state restoration in my app, but for some reason I cannot get it to work. I have the restoration ID set in all view controllers, navigation controllers, and tab bar controllers. I have opted in using the following functions in AppDelegate
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
return true
}
func application(_ application: UIApplication, shouldRestoreSecureApplicationState coder: NSCoder) -> Bool {
return true
}
func application(_ application: UIApplication, shouldSaveSecureApplicationState coder: NSCoder) -> Bool {
return true
}
After killing the app on simulator and on a device, it does not restore any states. I am not receiving any warnings, am I missing something?