NSAllowsArbitraryLoadsInWebContent does not work for <video> elements. Neither does NSAllowsArbitraryLoadsInMedia

Originator:birdmanjeremy
Number:rdar://28678048 Date Originated:10/07/2016
Status:Open Resolved:
Product:iOS Product Version:10
Classification: Reproducible:Yes
 
Area:
WebKit

Summary:
It is impossible to bypass ATS for WKWebViews loading non-https video elements. The attached example demonstrates this. It's reporduceible on iOS 10, but not in the iOS 10 Simulator

Steps to Reproduce:
1. Download example project
2. Build and run on iOS 10 device.
3. Attempt to play video.
4. Video does not play
5. Check ATS keys in info.plist

Expected Results:
Video should play.

Actual Results:
Video does not play.

Version:
iOS 10.0.2

Notes:
Attached is a screenshot of what I see when connecting the safari debug tools to the webview.

Configuration:
iPhone 6s

Attachments:
'Screen Shot 2016-10-07 at 2.58.44 PM.png' and 'ATSTest.zip' were successfully uploaded.

Comments

See also

I am having the same issue http://www.openradar.me/radar?id=4992661530345472

By geza.miklo at Dec. 2, 2016, 9:41 a.m. (reply...)

Sample Code:

WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc] init];

config.allowsInlineMediaPlayback = YES;

WKWebView *webView = [[WKWebView alloc] initWithFrame:self.view.frame configuration:config];

[self.view addSubview:webView];

[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://callmenick.com/_development/html5-video/"]]];

And set NSAllowsArbitraryLoadsInWebContent to YES in info.plist.

By birdmanjeremy at Oct. 12, 2016, 6:28 p.m. (reply...)

Also broken for

By birdmanjeremy at Oct. 12, 2016, 6:26 p.m. (reply...)

We have determined that this also happens using UIWebView.

By birdmanjeremy at Oct. 12, 2016, 6:24 p.m. (reply...)

I have verified that this does not work on iOS 10.1 beta 14B55c using the XCode 8.1 beta as well.

By birdmanjeremy at Oct. 12, 2016, 6:24 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!