application openURL in Swift

前端 未结 3 820
囚心锁ツ
囚心锁ツ 2021-01-18 13:57

I am having an issue with the Appdelegate method OpenURL.

I have setup my Imported UTI\'s and Document Type. But when opening my app from a mail attachment, the app

3条回答
  •  孤独总比滥情好
    2021-01-18 14:55

    Swift 5 version of Muhammad Asyraf's answer:

        func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
            let sourceApplication = options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String
            let annotation = options[UIApplication.OpenURLOptionsKey.annotation]
    
            return true
        }
    

提交回复
热议问题