Instance Method

application(_:configurationForConnecting:options:)

Returns the configuration data for UIKit to use when creating a new scene.

Declaration

optional func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration

Parameters

application

The singleton app object.

configurationForConnecting

The session object associated with the scene. This object contains the initial configuration data loaded from the app's Info.plist file, if any.

options

System-specific options for configuring the scene.

Return Value

The configuration object containing the information needed to create the scene.

Discussion

Implement this method if you do not include scene-configuration data in your app's Info.plist file, or if you want to alter the scene configuration data dynamically. UIKit calls this method shortly before creating a new scene. In your implementation, return a UISceneConfiguration object with the scene details, including the type of scene to create, the delegate object you use to manage the scene, and the storyboard containing the initial view controller to display.

If you do not implement this method, you must provide scene-configuration data in your app's Info.plist file.

See Also

Configuring and Discarding Scenes

func application(UIApplication, didDiscardSceneSessions: Set<UISceneSession>)

Tells the delegate that the user closed one or more of the app's scenes from the app switcher.

Beta

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software