Bartłomiej Semańczyk Bartłomiej Semańczyk - 4 years ago 90
iOS Question

AFNetworking works for iOS8, but doesn't work for iOS9

What might be wrong if my class responsible for connection works when I run on simulator with

iOS8
, but it is not going to work with simulator on
iOS9
. What is the reason?

Answer Source

If you are loading a non-https URL using AFNetworking, you need to add an App Transport Security override in your info.plist file like this:

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

You can also add overrides for specific domains, which is a better approach. More info here:

http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download