diff options
| -rw-r--r-- | ios/MullvadVPN/AppDelegate.swift | 16 | ||||
| -rw-r--r-- | ios/MullvadVPN/Info.plist | 2 |
2 files changed, 15 insertions, 3 deletions
diff --git a/ios/MullvadVPN/AppDelegate.swift b/ios/MullvadVPN/AppDelegate.swift index 2b106a2ff1..07b20b7d36 100644 --- a/ios/MullvadVPN/AppDelegate.swift +++ b/ios/MullvadVPN/AppDelegate.swift @@ -25,6 +25,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { #endif func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Setup logging initLoggingSystem(bundleIdentifier: Bundle.main.bundleIdentifier!) #if DEBUG @@ -35,13 +36,23 @@ class AppDelegate: UIResponder, UIApplicationDelegate { #endif #if targetEnvironment(simulator) + // Configure mock tunnel provider on simulator SimulatorTunnelProvider.shared.delegate = simulatorTunnelProvider #endif - let accountToken = Account.shared.token + // Create an app window + self.window = UIWindow(frame: UIScreen.main.bounds) + + // Set an empty view controller while loading tunnels + let launchController = UIViewController() + launchController.view.backgroundColor = .primaryColor + self.window?.rootViewController = launchController + // Update relays RelayCache.shared.updateRelays() + // Load tunnels + let accountToken = Account.shared.token TunnelManager.shared.loadTunnel(accountToken: accountToken) { (result) in DispatchQueue.main.async { if case .failure(let error) = result { @@ -72,6 +83,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate { } } + // Show the window + self.window?.makeKeyAndVisible() + return true } diff --git a/ios/MullvadVPN/Info.plist b/ios/MullvadVPN/Info.plist index b4fc95ec26..169f726c0f 100644 --- a/ios/MullvadVPN/Info.plist +++ b/ios/MullvadVPN/Info.plist @@ -26,8 +26,6 @@ <true/> <key>UILaunchStoryboardName</key> <string>LaunchScreen</string> - <key>UIMainStoryboardFile</key> - <string>Main</string> <key>UIRequiredDeviceCapabilities</key> <array> <string>armv7</string> |
