【发布时间】:2020-02-25 17:13:36
【问题描述】:
我正在尝试使用自定义方案从网页打开我的应用程序。应用已打开,但未调用以下方法:
func application(_ app: UIApplication, open url: URL, options [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
// This is not called
}
我的info.plist 如下所示:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>MyApp</string>
</array>
<key>CFBundleURLName</key>
<string>url here</string>
</dict>
</array>
该项目是使用 Xcode 11.1 创建的,我正在 iOS 13 上进行测试。
【问题讨论】:
-
你在 iOS13 上吗?
-
是的。有关系吗?
-
如果您有 iOS 13 应用程序,则会调用 SceneDelegate 方法。
-
是的,我愿意...我会检查并让您知道,请像答案一样发布...
-
是的,看看thisQ&A
标签: ios swift ios13 custom-scheme-url