Welcome to the Treehouse Community
Looking to learn something new?
Riken Patel659 Points
App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions
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.
Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: 'data parameter is nil'
Christin Lepson24,269 Points
The reason this is happening is because xCode wants you to work with secure websites (https://) and TeamTreehouse's json URL is not secure (http://)
To do this we must make an exceptions by editing the info.plist file in your project.
Right click your info.plist file and click "Open With External Editor." This will open your info.plist file in a text editor. If you don't have a text editor I reccomens SublimeText or TextMate.
Next, paste the following code before the </dict>
<key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>yourserver.com</key> <dict> <!--Include to allow subdomains--> <key>NSIncludesSubdomains</key> <true/> <!--Include to allow HTTP requests--> <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> <true/> <!--Include to specify minimum TLS version--> <key>NSTemporaryExceptionMinimumTLSVersion</key> <string>TLSv1.1</string> </dict> </dict> </dict>