Vincent Tourraine
Blog

Notes WWDC 2019 : Architecting Your App for Multiple Windows

#dev #iOS

Référence : Session 258 - Architecting Your App for Multiple Windows

Changes to app lifecycle

App delegate responsibilities:

Using the scene delegate

Configuring new sessions

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

Scene disconnection

func sceneDidDisconnect(_ scene: UIScene)
      

Cleaning up discarded sessions

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

Architecture

Per-scene state restoration

func stateRestorationActivity(for scene: UIScene) -> NSUserActivity?
      

Keeping scenes in sync

Different methods to update interface across scenes: