報錯“This app is not allowed to query for scheme sinaweibosso”

來源:互聯網
上載者:User

標籤:沒有   src   ons   webview   app   功能   看到了   apple   需要   

②如果你的輸出資訊是 xxxx - error: "This app is not allowed to query for scheme xxxx"

 

(在這裡因為我的 App 整合了分享到QQ、、微博的功能,xxxx部分我看到了 mqq、wechat、sinaweibosso 等多條資訊)

去 Info.plist 裡面建立一個叫 LSApplicationQueriesSchemes 的 Array,把你在xxxx部分看到的詞彙一個一個填進去,直至控制台沒有任何相關輸出即可。

 

 

 

③關於其他通過 WebView 訪問 http 網址引發的控制台報錯資訊


Info.plist 中設定 ATS
<key>NSAppTransportSecurity</key><dict><!--Include to allow all connections (DANGER)--><key>NSAllowsArbitraryLoads</key><true/></dict>

如之前所說,Apple 希望我們訪問相對安全的 HTTPS,所以在你需要訪問 HTTP 時,
雖 Apple 不建議,但可通過在 Info.plist 中聲明如所示的內容,倒退回不安全的網路請求,這樣依然能讓 App 訪問指定 HTTP,甚至任意的 HTTP。



文/KyXu大魔王(簡書作者)
原文連結:http://www.jianshu.com/p/e38a609f786e
著作權歸作者所有,轉載請聯絡作者獲得授權,並標註“簡書作者”。

 

報錯“This app is not allowed to query for scheme sinaweibosso”

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.