0

我尝试在我的 IOS 项目中实现 App Link。我已经设置了 URL 方案,并通过输入testApps://移动 safari 进行了测试。提示打开应用程序对话框。

我还设置了一个 html 文件,通过公共域访问,www.testSite.com/testApps.html并包含大多数 Apps Link 教程网站推荐的基本元标记。该文件如下图所示:

<html>
    <head>
       <meta property="al:ios:url" content="testApps://default" />
       <meta property="al:ios:app_name" content="testApps" />
    </head>
</html>

但是,当我输入 URL 时,Safari 不会提示打开应用程序。

我还设置了 facebook 应用程序设置 FB_test_Apps,将 URL Scheme Suffix 设置为testApps,打开Single sign onDeep Linking

我在 facebook 上分享www.testSite.com/testApps.html以及在 facebook 应用程序FB_test_Apps下注册的应用程序(在帖子下将显示为“Via FB_test_Apps”)。

当我点击这两个帖子时,Facebook 会将其加载到 facebook 的 webview 中。但是它也不会提示打开我的应用程序。

有什么我错过了吗?

更新

我发现这个问题只发生在 IOS9 中。iOS 8 能够正常工作。

问候史蒂文

4

2 回答 2

2

是的,iOS 9 做了一些改变。您需要将您在项目中使用的 url 方案列入白名单。只需在 info-plist 中添加数组类型的 LSApplicationQueriesSchemes 并提及您需要在其下的项目中打开的 url。

于 2015-10-18T17:23:01.603 回答
0

我想派对太晚了。

正如 Bhavuk 上面提到的,您必须将 iOS9 及更高版本的 fb 应用程序列入白名单。

<key>LSApplicationQueriesSchemes</key>
    <array>
     <string>fb</string>
     <string>fbapi</string>
     <string>fbauth2</string>
     <string>fbshareextension</string>
     <string>fb-messenger-api</string>
    </array>

从这里参考。

iOS 9 无法使用 URL SCHEME 打开 Instagram 应用

于 2016-09-29T19:22:28.783 回答