我正在尝试使用自定义 scheme 从网页打开我的应用。应用程序已经打开,但是以下方法没有被调用:
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 上进行测试。