Description
Use case
After adopting SceneDelegate, several AppDelegate methods are not call anymore. But instead, corresponding SceneDelegate methods will be called.
Verified not called on app delegate, but called on scene delegate:
- sceneWillEnterForeground:
- sceneDidBecomeActive:
- sceneWillResignActive:
- sceneDidEnterBackground:
Unverified but possibly similar behavior as above:
- scene:willContinueUserActivityWithType:
- scene:continueUserActivity:
- scene:didFailToContinueUserActivityWithType:error:
- stateRestorationActivityForScene:
- scene:restoreInteractionStateWithUserActivity:
- scene:didUpdateUserActivity:
I suspect the above list will be similar behavior (unverified), because the pattern here seems to be that, as long as there's a similar function in SceneDelegate, then it will replace the corresponding function in AppDelegate.
Also note these UIApplication notifications are still working:
- didFinishLaunchingNotification
- didBecomeActiveNotification
- didEnterBackgroundNotification
Proposal
We should migrate those methods over to scene delegate.
Side note: app delegate could be deprecated in the future from some sources.