SceneDelegate

class SceneDelegate : UIResponder, UIWindowSceneDelegate

Default class generated for iOS apps.

  • Undocumented

    Declaration

    Swift

    var window: UIWindow?

Handle adding a new contact when scanning their QR code

  • openURLContexts handles deep links for the app. They allow users to easily share contact information by scanning friends QR codes. This is the callback function which is activated when a user clicks on the dIM-link in the camera app.

    Declaration

    Swift

    func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>)

    Parameters

    scene

    The current scene that we are on. For some reason always load HomeView.

    URLContexts

    The URL contexts formatted as dim://username//publickey

  • Set up the scene and connect it to our SetupView.

    Declaration

    Swift

    func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions)

    Parameters

    scene

    The scene to set up.

    session

    This current UISession.

    connectionOptions

    Not in use.

  • Not used but must be supported according to the protocol.

    Declaration

    Swift

    func sceneDidDisconnect(_ scene: UIScene)
  • Not used but must be supported according to the protocol.

    Declaration

    Swift

    func sceneDidBecomeActive(_ scene: UIScene)
  • Not used but must be supported according to the protocol.

    Declaration

    Swift

    func sceneWillResignActive(_ scene: UIScene)
  • Not used but must be supported according to the protocol.

    Declaration

    Swift

    func sceneWillEnterForeground(_ scene: UIScene)
  • Saves the current context to CoreData if the app is backgrounded (the user returns to the homescreen.).

    Declaration

    Swift

    func sceneDidEnterBackground(_ scene: UIScene)