0
votes

I'm still getting this error: "App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file." although, I have used same same solution on other projects and worked fine. I'm using Xcode 7.1 with iPhone simulator.

<!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>
3
Check it you add this key to right plist file. Sometimes I add this key to target test. - vien vu
@walk_alone You are absolutely right, I spent an hour on this issue that I was using the wrong plist. Thanks buddy - Mr.KLD

3 Answers

0
votes

You have to set the NSAllowsArbitraryLoads key to YES under NSAppTransportSecurity dictionary in your .plist file. Hope this helps!

enter image description here

0
votes

I think it's a editor bug for xcode7.1

You can actually open the plist file by a local editor like sublime text. Then change it to

<key>NSAllowsArbitraryLoads</key>
<true/>

and save.

The reason is even you change it in the xcode and see the changed result, it didn't actually change.

0
votes

Go to your plist open as a source code and add this code in your plist

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