You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's how it works: If you have an "Application Scene Manifest" in your Info.plist and your app delegate has a configurationForConnectingSceneSession method, the UIApplication won't send background and foreground lifecycle messages to your app delegate. That means the code in these methods won't run:
applicationDidBecomeActive
applicationWillResignActive
applicationDidEnterBackground
applicationWillEnterForeground
The app delegate will still receive the willFinishLaunchingWithOptions: and didFinishLaunchingWithOptions: method calls so any code in those methods will work as before.
UIApplication notifications
Notifications still trigger in iOS 13 if adopting SceneDelegate
Use foreground transitions to prepare your app’s UI to appear onscreen. An app's transition to the foreground is usually in response to a user action. For example, when the user taps the app’s icon, the system launches the app and brings it to the foreground. Use a foreground transition to update your app’s UI, acquire resources, and start the services you need to handle user requests.
All state transitions result in UIKit sending notifications to the appropriate delegate object:
In iOS 13 and later—A UISceneDelegate object.
In iOS 12 and earlier—The UIApplicationDelegate object.
You can support both types of delegate objects, but UIKit always uses scene delegate objects when they are available. UIKit notifies only the scene delegate associated with the specific scene that is entering the foreground. For information about how to configure scene support, see Specifying the Scenes Your App Supports.
keyWindow
Show most recent activeUIWindow
UIApplication.shared.keyWindow
This property holds the UIWindow object in the windows array that is most recently sent the makeKeyAndVisible() message.
Events
open url
life cycle
UIApplication notifications
Notifications still trigger in iOS 13 if adopting SceneDelegate
https://developer.apple.com/documentation/uikit/app_and_environment/scenes/preparing_your_ui_to_run_in_the_foreground
keyWindow
Show most recent active
UIWindow
AppDelegate vs SceneDelegate
Get sceneDelegate from AppDelegate
order
Read more
The text was updated successfully, but these errors were encountered: