Search code examples
iosflickrios9

App Transport Security Exceptions IOS9


I am writing an IOS9 app which uses flickr.

Flicker uses an url format of https://farm{farm-id}.staticflickr.com/

The farm id is a number

In my info.plist I have defined whitelisted domains NSAppTransportSecurity - NSExceptionDomains

How can I define these for the farm id as a wild card?

Currently I just did farm1.staticflickr.com farm2.staticflickr.com......up till 9 but I am unsure how far flickr goes.


Solution

  • Add an exception for staticflickr.com and in that exception add a key called NSIncludesSubdomains and set it to true.

    <key>NSAppTransportSecurity</key>
        <dict>      
            <key>NSExceptionDomains</key>
            <dict>
                <key>staticflickr.com</key>
                <dict>
                    <key>NSIncludesSubdomains</key>
                    <true/>
                </dict>         
            </dict>
        </dict>