2015-11-06 42 views
3

我想從safari打開我的應用程序。這是在info.plist中的自定義方案:用自定義方案打開應用程序 - 防止「在<appname>中打開」警告?

<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 <app-name>"。我的問題是我可以防止這個警告彈出?

+0

我不相信有它周圍的任何方式。這是iOS 9安全性提高的一部分。 – Avi

+0

您是否能夠找到解決方案?我們可以使用通用鏈接嗎? –

回答

0

another item 我認爲這可以幫助ü

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

您解釋更多關於您的答案。[來自評論](http://stackoverflow.com/review/first-posts/10520279) – Alex

相關問題