Anthony Saltarelli
Anthony Saltarelli

Reputation: 345

App Transport Security has blocked Parse files... Swift 2 error

I continually get this type of error in my app which uses a Parse.com backend:

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.

I have tried adding the following to my info.plist but it has not worked. No other solutions online have worked. Does anyone know what to do?

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    <key>NSExceptionDomains</key>
    <dict>
        <key>files.parsetfss.com</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSExceptionsAllowsInsecureHTTPLoads</key>
            <true/>
        </dict>
    </dict>
</dict>

Upvotes: 6

Views: 2358

Answers (3)

Prabhu.Somasundaram
Prabhu.Somasundaram

Reputation: 1390

enter image description here

Just add above plist entry in your projects Info.plist

Upvotes: 0

der_michael
der_michael

Reputation: 3362

Also Parse just announced that they will update their SSL certs to be ATS compatible...

Upvotes: 0

Paulw11
Paulw11

Reputation: 114875

This plist entry is working for me -

<key>NSAppTransportSecurity</key>
    <dict>
        <key>NSExceptionDomains</key>
        <dict>
            <key>files.parsetfss.com</key>
            <dict>
                <key>NSIncludeSubdomains</key>
                <true/>
                <key>NSExceptionAllowsInsecureHTTPLoads</key>
                <true/>
            </dict>
        </dict>
    </dict>

You have the key NSIncludesSubdomains rather than NSIncludeSubdomains - an extra s between 'Include' and 'Subdomains'

Upvotes: 6

Related Questions