【问题标题】:open app with custom scheme - prevent "open in <appname>" warning?使用自定义方案打开应用程序 - 防止“在 <appname> 中打开”警告?
【发布时间】:2016-02-07 11:05:59
【问题描述】:

我想从 Safari 中打开我的应用程序。这是 info.plist 中的自定义方案:

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLName</key>
        <string>com.appvendor.rentalapp</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>open-rental</string>
        </array>
    </dict>
</array>

如果我在 Safari 中按下这样的按钮:

<a href="open-rental://custom-string">Open App</a>

我收到 iOS 警告 "Open in &lt;app-name&gt;"。我的问题是我可以阻止这个警告弹出吗?

【问题讨论】:

  • 我不相信有任何解决办法。这是 iOS 9 中增强的安全性的一部分。
  • 您找到解决方案了吗?我们可以使用通用链接吗?

标签: javascript html ios objective-c safari


【解决方案1】:

another item 我认为这可以帮助你

setTimeout(function(){
    window.location = "weixin://";  //scheme
    setTimeout(function () {
        window.location = appstore url;
    }, 500);
}, 1);

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-01-02
  • 1970-01-01
  • 1970-01-01
  • 2020-09-01
相关资源
最近更新 更多