 
         // Short circuit the app if we want to email logs from the debug menu
         if DebugSettingsBundleOptions.emailLogsOnLaunch {
-            self.window?.rootViewController = UIViewController();
+            self.window?.rootViewController = UIViewController()
             presentEmailComposerWithLogs()
             return true
         } else {
-            return startApplication()
-        }
-    }
-
-    private func startApplication() -> Bool {
+            return startApplication(application, withLaunchOptions: launchOptions)
+        }
+    }
+
+    private func startApplication(application: UIApplication,  withLaunchOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
         log.debug("Setting UA…")
         // Set the Firefox UA for browsing.
         setUserAgent()

        self.tabManager = TabManager(defaultNewTabRequest: defaultRequest, prefs: profile.prefs, imageStore: imageStore)
        self.tabManager.stateDelegate = self

        browserViewController = BrowserViewController(profile: self.profile!, tabManager: self.tabManager)

        // Add restoration class, the factory that will return the ViewController we
        // will restore with.
        log.debug("Initing BVC…")

        browserViewController.restorationIdentifier = NSStringFromClass(BrowserViewController.self)
        browserViewController.restorationClass = AppDelegate.self
        browserViewController.automaticallyAdjustsScrollViewInsets = false

        Logger.syncLogger.newLogWithDate(NSDate())

        log.debug("Getting profile…")
        let profile = getProfile(application)

        if !DebugSettingsBundleOptions.disableLocalWebServer {
            log.debug("Starting web server…")
