使用 URL 方案打开已安装的应用程序无法正常工作

Opening installed app using URL Scheme is not working

我有一个共享 link 的应用程序。当有人点击那个 link 时,它正在打开 Safari 移动应用程序,然后自动打开应用程序(比如说:AppName)如果安装在他的设备上。

let url =  "appname://listener?mid=560aa7"

这在 iOS 8+ 上运行完美,但在 iOS 9 上停止工作。 请注意,我还在 URL Scheme 上添加了 FB。 我的URLType是这样的:

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleTypeRole</key>
          <string>Editor</string>
        <key>CFBundleURLName</key>
          <string>com.appname.mobile</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>fb705.....</string>
            <string>appname</string>
        </array>
    </dict>
</array>

从 iOS9 开始,我添加了:

<key>LSApplicationQueriesSchemes</key>
<array>
    <string>appname</string>
</array>

并没有成功。谁能帮帮我?

我试过 appname:appname:// 但没有成功。

我还为 openURL 添加了新方法:

func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool

我没有发现你这边有问题,似乎一切都设置正确。 但是,关于 iOS 9,其他用户报告了 iframe 的这个问题。确保在服务器端正确设置了这些东西。检查这两个链接:

iOS 9 iFrame Problem 1