-2

I'm working with a simple app just to load web pages using UIWebView, however when I tried to load some pages I got this message

"2016-06-21 14:45:13.568 Free Trials[34369:7398070] 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 went to the Info.plist file to remove this block, however I didn't know what to change, can anyone tell me what settings to change there so I can fix this block? that's my Info.plist

Mina
  • 63
  • 1
  • 14
  • Have you configure transport security dictionary in your info.plist? – Jigar Tarsariya Jun 21 '16 at 04:50
  • @JigarTarsariya no I didn't, I don't know it even more – Mina Jun 21 '16 at 04:51
  • Srsly? A photo of your screen??? You should REALLY google how to take screenshots on a mac. It is 100 times faster than taking an image and syncing it around AND it is of far better quality – luk2302 Jun 21 '16 at 13:21
  • @luk2302 I had no internet connection on Mac while I was typing the question (I was on phone) and all what I had was my 4G on my iPhone. The only option was to take the photo with my phone. Of course I'm not waiting for you to tell me about that! – Mina Jun 21 '16 at 13:26
  • you can always share the internet connection of your phone with your mac, which would probably even make writing the question a lot easier for you. – luk2302 Jun 21 '16 at 14:33
  • @luk2302 I already did to test the app only as you should notice that it was an app to show internet pages, however I didn't use it to connect to Stackoverflow.com to save data plan and I already have an app for it on my iPhone! – Mina Jun 21 '16 at 14:37

1 Answers1

2

Try it like below:

NSAllowsArbitraryLoads key to YES under NSAppTransportSecurity dictionary in your .plist file

enter image description here

Hope this help you.

Jigar Tarsariya
  • 3,189
  • 3
  • 14
  • 38
  • I can't find it in my Info.plist – Mina Jun 21 '16 at 05:18
  • You will not find it but you have to specify it by clicking on + button besides the root key.. – Jigar Tarsariya Jun 21 '16 at 05:20
  • You need to specify it manually. If you still have issue then let me know – Jigar Tarsariya Jun 21 '16 at 05:21
  • Sorry what's the root key? – Mina Jun 21 '16 at 05:27
  • 1
    See in your info.plist file, there is first row like - `Information property list`. Click there so there is one + button besides it. Click on it so it will add new row, then add this `NSAppTransportSecurity` key with type `Dictionary` and then click + button of this newly added row and add one more key `NSAllowsArbitaryLoads` type of Bool and set it `YES`. – Jigar Tarsariya Jun 21 '16 at 05:30
  • I did it 1st but I thought I should find the NSAppTransportSecurity, however I didn't! I did it now – Mina Jun 21 '16 at 05:37
  • Away of the question, do u know what does NS that comes in the beginning of many codes stand for? – Mina Jun 21 '16 at 06:37
  • Yes, Cocoa classes begin with `NS` which stands for `NextStep`..please refer : http://stackoverflow.com/questions/473758/what-does-the-ns-prefix-mean – Jigar Tarsariya Jun 21 '16 at 06:39