我有下一個問題,我必須添加NSAppTransportSecurity密鑰到我的info.plist文件。Phonegap修改config.xml爲NSAppTransportSecurity
因爲我有很多不同的config.xml用於測試,開發和生產服務器,所以手動將NSAppTransportSecurity密鑰添加到plist並不好。
這可以在config.xml本身內完成嗎?
我已經試過這樣:
<manifest device="ios" tag="plist/dict">
<key>CFBundleURLTypes</key>
<array>
<dict>
...
</dict>
</array>
<!--Here is my own:-->
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</manifest>
但經過科爾多瓦打造的iOS我得到這個在我的info.plist:
<key>[object Object]</key>
<string>NSAppTransportSecurity</string>
但CFBundleURLTypes得到正常移植。我究竟做錯了什麼?
只是增加平臺的ios –
然後使用默認的info.plist文件進行訪問 –