Branch.io link for iOS 9+ issues
<p>I used Branch.io for my project to launch app from my website. What I want is if app is off, when I click the universal link on web it will open HomePage first. In contrast, it opens another.  It works well with iOS 8. But in iOS 9+, it always open the LaunchScreen.</p>

<p>Please, take a look at my code:</p>

<p>AppDelegate:</p>

<pre><code>func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -&gt; Bool {
    // Override point for customization after application launch.

    let branch = Branch.getInstance()
    branch.initSessionWithLaunchOptions(launchOptions) { (params, error) -&gt; Void in
      DHIndicator.hide()
      if let _ = params {
        print("kdlkasdlf: \(params.debugDescription)")
        if let str = params["$deeplink_path"], url = NSURL(string: str as! String) {
          NSLog("link: \(url)")
          self.path = url.path
          self.query = url.query
          LaunchAppFlowManager.shareInstance.displayLaunchDetails()
        } else {
          // load your normal view
        }
      }
    }
window = UIWindow(frame: UIScreen.mainScreen().bounds)
    window?.makeKeyAndVisible()
    window?.backgroundColor = UIColor.whiteColor()
    AccountFlowManager.shareInstance.start()
}

func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -&gt; Bool {
    Branch.getInstance().handleDeepLink(url)
    if AppDelegate.shareInstance().window?.rootViewController?.nibName != "LaunchScreenVC" {
      DHIndicator.show()
    }
    return true
  }

func application(application: UIApplication, continueUserActivity userActivity: NSUserActivity, restorationHandler: ([AnyObject]?) -&gt; Void) -&gt; Bool {
    print(userActivity.webpageURL?.absoluteString)
    if AppDelegate.shareInstance().window?.rootViewController?.nibName != "LaunchScreenVC" {
      DHIndicator.show()
    }
    return Branch.getInstance().continueUserActivity(userActivity)
  }
</code></pre>

<p>And, func to start app:</p>

<pre><code>if let _ = AppDelegate.shareInstance().path, _ = AppDelegate.shareInstance().query {
        let navi = UINavigationController(rootViewController: HomePageVC())
        self.navi = navi
        AppDelegate.shareInstance().window?.rootViewController = navi
      } else {
        let vc = LaunchScreenVC()
        AppDelegate.shareInstance().window?.rootViewController = vc
      }
</code></pre>