2

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.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Ryan Heitner
  • 13,119
  • 6
  • 77
  • 119

1 Answers1

6

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>
dan
  • 9,695
  • 1
  • 42
  • 40