0

私はまだこのエラーを受け取ります:「App Transport Security は安全でないため、クリアテキストの HTTP (http://) リソースの読み込みをブロックしました。一時的な例外は、アプリの Info.plist ファイルを介して構成できます。」ただし、同じものを使用しました他のプロジェクトでも同じソリューションで、うまくいきました。iPhoneシミュレーターでXcode 7.1を使用しています。

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string></string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>CFBundleName</key>
<string></string>
<key>CFBundleDisplayName</key>
<string></string>
<key>CFBundleVersion</key>
<string></string>
<key>CFBundleShortVersionString</key>
<string></string>

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

<key>CFBundleGetInfoString</key>
<string></string>
</dict>
</plist>
4

3 に答える 3

0

.plist ファイルの NSAppTransportSecurity ディクショナリで NSallowArbitraryLoads キーを YES に設定する必要があります。お役に立てれば!

ここに画像の説明を入力

于 2015-10-28T16:56:02.930 に答える
0

ソースコードとして開いているplistに移動し、このコードをplistに追加します

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>
于 2016-02-15T13:18:19.943 に答える