iOS App Transport Security problem

I’m getting this error in iOS9 :

ERROR: network request failed ... The resource could not be loaded because the App Transport Security policy requires the use of a secure connection

Now I have read through all of the threads and information I can find and have tried various entries in the NSExceptionDomains table of build.settings but I am now going a bit mad. Specifically I have tried to follow instructions onthis page meticulously.

Basically my app grabs a json file from my server and it’s worked well so far, I guess I’ve only just started testing on iOS9. Obviously replacing example.com with my own; I first tried this :

NSAppTransportSecurity = { NSExceptionDomains = { ["example.com"] = { NSIncludesSubdomains = true, NSThirdPartyExceptionAllowsInsecureHTTPLoads = true, }, }, },

Then when that didn’t work, following the answer to this stackoverflow question, I tried this :

NSAppTransportSecurity = { NSExceptionDomains = { ["example.com"] = { NSIncludesSubdomains = true, NSExceptionAllowsInsecureHTTPLoads = true, NSExceptionRequiresForwardSecrecy = true, NSExceptionMinimumTLSVersion = "TLSv1.2", NSThirdPartyExceptionAllowsInsecureHTTPLoads = false, NSThirdPartyExceptionRequiresForwardSecrecy = true, NSThirdPartyExceptionMinimumTLSVersion = "TLSv1.2", NSRequiresCertificateTransparency = false, }, }, },

Nothing is woking for me, not even this :

NSAppTransportSecurity = { NSAllowsArbitraryLoads = true, },

which makes me think I am doing something really wrong.

Sorry. Ignore this, I was being a dumb-ass. I solved the problem.

Basically I didn’t realise that I already had a  NSAppTransportSecurity table set in my build.settings. I had added this earlier in the development of my app when setting up facebook connect to whitelist the facebook servers. So obviously this was overwriting the table I added above it.

Sorry. Ignore this, I was being a dumb-ass. I solved the problem.

Basically I didn’t realise that I already had a  NSAppTransportSecurity table set in my build.settings. I had added this earlier in the development of my app when setting up facebook connect to whitelist the facebook servers. So obviously this was overwriting the table I added above it.