Google 中的 OpenInChrome 未检测到或打开 Google Chrome 中的应用 iOS 9

OpenInChrome from Google not detecting or opening Google Chrome app in iOS 9

有没有人想出如何检测 Google Chrome 是否已安装,然后通过 link 在 iOS 9 中传递给它的 link 从您自己的应用程序打开它?

我以前用的OpenInChromeController which according to Google是推荐的方法。 Google 似乎没有为 iOS 9 更新该文档,并且 OpenInChromeController 似乎已被放弃。

我明白了,你只需要将它作为 LSApplicationQueriesSchemes 添加到你的 plist 中,然后你就可以使用 canOpenUrl 查看是否安装了应用程序

<key>LSApplicationQueriesSchemes</key> <array> <string>urlscheme</string> <string>urlscheme2</string> <string>urlscheme3</string> <string>urlscheme4</string> </array>

我认为更详细的答案是将以下三个方案添加到 YOURAPP-Info.plist

中的 LSApplicationQueriesSchemes
  • 谷歌浏览器
  • 谷歌浏览器
  • googlechrome-x-回调

更多详情请参考Cocoapods