0

I have an app that uses parse and ever since updating to iOS 9 it doesn't pull any data but rather gives me this error message over and over again...

[Error]: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection. (Code: 100, Version: 1.8.2)

I've noticed that libz.dylib and libsqlite3.dylib are in red, I'm not sure if that has anything to do with it.

Side note: in a different project I tried to add those frameworks but they no longer exist so I went to add other, then did CMD shift G, then put in '/usr/lib', and grabbed them from there, the libsqlite3 worked fine but the libz.dylib automatically changed to libz.1.dylib when I added it.

Any ideas? Thank you!

Echizzle
  • 3,359
  • 5
  • 17
  • 28

3 Answers3

1

You may need to add a security exception in your info.plist file. Some combination of the keys below should solve it.

enter image description here

picciano
  • 22,341
  • 9
  • 69
  • 82
  • you might take a good look at other connections your app might be making. it may not be parse – picciano Oct 12 '15 at 23:24
  • We have a four square API in another view controller but that doesn't get called until that VC is opened up. It's also https instead of http which I think is necessary for iOS 9. It's a real mystery. – Echizzle Oct 12 '15 at 23:29
  • If you have a proxy app (such as Charles) you can run the traffic from your phone through it and see what other connections are being made. – picciano Oct 13 '15 at 00:34
0

You have to follow the App Transport Security requirements specified in https://developer.apple.com/library/prerelease/ios/technotes/App-Transport-Security-Technote/

As a quick fix, you can add the following in your Info.plist:

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

This code will disable App Transport Security.

PabloLerma
  • 620
  • 5
  • 12
  • 1
    That will work, but it's a bit like swatting a fly with a sledge hammer. Be as precise as you can be when adding the security exceptions. Even my answer above is probably too broad. – picciano Oct 12 '15 at 22:51
  • Yeah, you are completely right! When I had to set ATS I started establishing security conditions quite broad and bringing them more specific later since I hadn't no server control. – PabloLerma Oct 12 '15 at 23:02
0

Your red dylib entries are another issue, most likely unrelated to the Transport Security policy error.

Try removing the libraries and relinking to the equivalent .tbd files instead.

enter image description here

picciano
  • 22,341
  • 9
  • 69
  • 82