近期蘋果公司iOS 9系統策略更新,限制了http協議的訪問,此外應用需要在“Info.plist”中將要使用的URL Schemes列爲白名單,纔可正常檢查其他應用是否安裝。
受此影響,當你的應用在iOS 9中需要使用微信SDK的相關能力(分享、收藏、支付、登錄等)時,需要在“Info.plist”裏增加如下代碼:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
<string>wechat</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
完成後需使用Xcode 7編譯。
請注意:未升級到微信6.2.5及以上版本的用戶,在iOS 9下使用到微信相關功能時,仍可能無法成功。