1

I am trying to display the www.usta.com website in my application.

I added the following keys to my .plist and the site loads some of the data. However, it will not load any of the images.

Does anyone know why the images won't load?

enter image description here

I am testing on an iPhone 6 device that has iOS 9.3 installed.

Sandy D.
  • 3,166
  • 1
  • 20
  • 31

2 Answers2

2

The website you're asking about uses Amazon S3 to serve images. This screenshot shows where the images are loading from:

Screenshot of USTA.com with Safari's Inspector Open

Since App Transport Security checks for a matching domain name, you need to add the s3 domain (amazonaws.com) to your plist.

Community
  • 1
  • 1
Moshe
  • 57,511
  • 78
  • 272
  • 425
  • Yes. I had tried the amazonaws.com before this and it wasn't working. My issue was that I needed to have s3.amazonaws.com instead of just amazonaws.com. Thank you so much! – Sandy D. May 04 '16 at 12:43
0

My first try would be to simply allow arbitrary loads, unless you are wanting ONLY usta.com to be able to load. This should be the most simple way of doing it unless you are wanting to restrict which kinds of websites (http vs https) will load other than usta.

enter image description here

Makapuu
  • 21
  • 6
  • According to Apple documentation, this is likely to get your app rejected. This setting is useful to find out if a problem is with ATS or somewhere else, but disabling ATS this way will get you rejected unless you have a very, very good reason. – gnasher729 May 02 '16 at 21:38
  • I actually haven't encountered that issue with Apple, though I do know it is something to be aware of. – Makapuu May 02 '16 at 23:36
  • I've always been told that it's not a good idea to use that setting so I prefer to set the Exception Domains. – Sandy D. May 04 '16 at 12:41