2

I am using a UIWebView to show a email subscription sign up page. It is not a https:// page so I obviously need to make an exception. I don't want to set it to NSAllowsArbitraryLoads because it is only one page in the whole app and the app may get rejected. So I have used the code below in my info.plist file but I still get the error. Lots of stackoverflow answers point towards this code however I can't get it to work in xcode 8/ ios 10.

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.

<key>NSExceptionDomains</key>
    <dict>
        <key>http://www.exampleurl.com</key>
        <dict>
            <key>NSExceptionRequiresForwardSecrecy</key>
            <true/>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
            <true/>
        </dict>
    </dict>
Ollie G
  • 39
  • 10

0 Answers0