I got following error when reqeust data from non-ssl protocol with NSURLSeesion API. I think it because of ATS in iOS9. Anyone knows what I should put in plist to opt out ATS?
-- ATS description from release note--
App Transport Security
App Transport Security (ATS) lets an app add a declaration to its
Info.plist
file that specifies the domains with which it needs secure communication. ATS prevents accidental disclosure, provides secure default behavior, and is easy to adopt. You should adopt ATS as soon as possible, regardless of whether you’re creating a new app or updating an existing one.If you’re developing a new app, you should use HTTPS exclusively. If you have an existing app, you should use HTTPS as much as you can right now, and create a plan for migrating the rest of your app as soon as possible.
---error---
Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo=0x7fcfebe17cc0 {NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x7fcfed93a700>, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorCodeKey=-9802, NSUnderlyingError=0x7fcfebd29f20 "The operation couldn’t be completed. (kCFErrorDomainCFNetwork error -1200.)", NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://apps.pyrogusto.com/Horoscope/1.0/document.json, NSErrorFailingURLStringKey=https://apps.pyrogusto.com/Horoscope/1.0/document.json, _kCFStreamErrorDomainKey=3}