Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. application (_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any]
  2.  
  3. private func application(_ application: UIApplication, continue userActivity: NSUserActivity,
  4. restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
  5. let handled = DynamicLinks.dynamicLinks().handleUniversalLink(userActivity.webpageURL!) { (dynamiclink, error) in
  6. // let vc = NomeStoryboard.instance.configuracoes.instantiateViewController(withIdentifier: "idSB_ConfiguracoesApp_Onboard") as! ConfiguracoesAppPageViewController
  7. // UIApplication.shared.keyWindow?.rootViewController = vc
  8. }
  9.  
  10. return handled
  11. }
  12.  
  13. @available(iOS 9.0, *)
  14. func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any]) -> Bool {
  15. return application(app, open: url,
  16. sourceApplication: options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String,
  17. annotation: "")
  18. }
  19.  
  20. func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
  21. if let dynamicLink = DynamicLinks.dynamicLinks().dynamicLink(fromCustomSchemeURL: url) {
  22. // Handle the deep link. For example, show the deep-linked content or
  23. // apply a promotional offer to the user's account.
  24. // ...
  25. return true
  26. }
  27. return false
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement