App Transport Security has blocked cleartext HTTP
App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app’s Info.plist file.
In Xcode if you get above error, this means you are trying to load HTTP URL instead of HTTPS.
- Replace HTTP with HTTPS or
- Add exception in the info.plist file under Xcode project. Right click info.plist file open as -> source code.
Add below code; Make sure domain don’t have www as prefix.
<key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>domain.com</key> <dict> <key>NSExceptionAllowsInsecureHTTPLoads</key> <true/> <key>NSIncludesSubdomains</key> <true/> </dict> </dict> </dict>
Save the file and if you open info.plist file as Property List, it will show as below;
For quick resolution of issues like this post, refer iOS App Development category.
You can also search the entire site or blog using search text.