a guest Jun 18th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @UIApplicationMain
  2. class AppDelegate: UIResponder, UIApplicationDelegate {
  3. func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
  4.     // Moved window creation to the SceneDelegate below
  5.     return true
  6.   }
  7.   // Added this method:
  8.   // Here we tell iOS what scene configuration to use
  9.   func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
  10.     connectingSceneSession.userInfo?["activity"] = options.userActivities.first?.activityType
  11.     // Based on the name of the configuration iOS will initialize the correct SceneDelegate
  12.     return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
  13.   }
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand