1

Run my app on iOS 9 device, got error logged:

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.

I surely did add NSAllowsArbitraryLoads to info.plist:

enter image description here

It still loaded nothing from the web... What did I miss?

Do I have to allow the certain domain for my web service ?

bluenowhere
  • 2,683
  • 5
  • 24
  • 37
  • Your code is correct . I had the same problem by adding this code worked . You try to contact another different url – Diego Sep 18 '15 at 06:39
  • 2
    try to clean the project Shift+Command+K – Jie Li Sep 18 '15 at 06:43
  • 1
    @pupboss remove app from my device, clean the project and restart it solved my problem. – bluenowhere Sep 18 '15 at 06:51
  • I am having the exact same problem. I tried both the blanket "AllowsArbitraryLoads" you used and also tried specifically allowing my domain. I did multiple cleans, restarts, etc, nothing has worked for me so far. Let m know if you figure anything out, and I'll do the same. – helloB Sep 22 '15 at 21:45
  • Just be aware that this is a temporary measure to let you get on with developing on iOS 9 until you fixed your resource loading code. When you submit to the App Store, Apple will want a pretty good reason why you are allowing unsafe http everywhere. – gnasher729 Oct 19 '15 at 14:28

2 Answers2

0

I have found how to fix this query.

Ref->How do I load an HTTP URL with App Transport Security enabled in iOS 9?

-> Open Plist File of your project.

-> Then add NSAppTransportSecurity as a Dictionary.

-> Then add NSAllowsArbitraryLoads as Boolean and set its value to YES.

enter image description here

Now, Clean your project and run your project.

Community
  • 1
  • 1
Avinash651
  • 1,399
  • 11
  • 17
0
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>

please add these line in your plist 1- go to plist 2- right click and go to open as -> source code 3- paste these line in source code

Teja Nandamuri
  • 11,045
  • 6
  • 57
  • 109
dheerendra
  • 537
  • 6
  • 8
  • please add these line in your plist 1- go to plist 2- right click and go to open as -> source code 3- paste these line in source code – dheerendra Oct 19 '15 at 10:57