简体   繁体   中英

iOS 9: App Transport Security

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?

在此处输入图片说明

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

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

Safari的Inspector打开的USTA.com的屏幕截图

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

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.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM