Error domain=nsurlerrordomain code=-1022 "The resource could not to loaded because the APP transport security Policy Res the use of a secure connection. userinfo={nsunderlyingerror=0x7fce0c9ac400 {Error domain=kcferrordomaincfnetwork code=-1022 "The resource could not being Loaded because the APP transport security policy requires the use of a secure connection. " userinfo={nserrorfailingurlstringkey=http://www.baidu.com/, nslocalizeddescription=the resource could not being loaded Because the APP transport security policy requires the use of a secure connection., Nserrorfailingurlkey=http://www.baidu. com/}}, nserrorfailingurlstringkey=http://www.baidu.com/, nserrorfailingurlkey=http://www.baidu.com/, Nslocalizeddescription=the resource could not to loaded because the APP transport security policy requires the use of a SE Cure connection.}
After Google verified, IOS9 introduced the new features of the app Transport Security (ATS). Details: App transport Security (ATS)
The new feature requires that the network accessed within the app must use the HTTPS protocol.
But now the company's project is using the HTTP protocol, the use of private encryption to ensure data security. It is not immediately possible to change to HTTPS protocol transfer. Finally, find the following workaround: Add the Nsapptransportsecurity type dictionary to the info.plist. Add the Nsallowsarbitraryloads type Boolean under Nsapptransportsecurity, and the value is set to Yes
Original address: http://www.data321.com/c91d410d.html