Apple introduced ATS with iOS 9 as a new security feature to improve privacy and security between apps and web services. ATS by default fails all non HTTPS requests. While this can be really nice for production environments, it can be a nuisance during testing.
ATS is configured in the target's
Info.plist file with the
NSAppTransportSecurity dictionary (
App Transport Security Settings in the Xcode Info.plist editor). To allow all HTTP content, add the
Allow Arbitrary Loads boolean (
NSAllowsArbitraryLoads) and set it to
YES. This is not recommended for production apps, and if HTTP content is required, it is recommended that it be selectively enabled instead.