forked from
jollywhoppers.com/witchsky.app
Bluesky app fork with some witchin' additions 馃挮
1import UIKit
2
3@main
4class AppDelegate: UIResponder, UIApplicationDelegate {
5 var window: UIWindow?
6 var controller: ViewController?
7
8 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
9 let window = UIWindow()
10 self.window = UIWindow()
11
12 let controller = ViewController(window: window)
13 self.controller = controller
14
15 window.rootViewController = self.controller
16 window.makeKeyAndVisible()
17
18 return true
19 }
20
21 func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
22 self.controller?.handleURL(url: url)
23 return true
24 }
25
26 func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
27 if let incomingURL = userActivity.webpageURL {
28 self.controller?.handleURL(url: incomingURL)
29 }
30 return true
31 }
32}