Skip to content

Instantly share code, notes, and snippets.

@kaishin kaishin/ATS.plist
Created Nov 6, 2016

Embed
What would you like to do?
ATS Sample
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>redalemeden.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTKemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
guard let url = URL(string: "http://redalemeden.com") else { return }
URLSession.shared.dataTask(with: url) { data, response, error in
guard let data = data, let html = String(data: data, encoding: .utf8) else { return }
print(html)
}.resume()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.