My project has a web view embedded into a view controller, and an external HTML file.
I'm trying to get my web view to load the contents of the html file, which I've successfully done until it suddenly stopped and started spewing this into the output window:
2017-03-04 21:01:19.923841 TestApp[807:166552] doing will appear 2017-03-04 21:01:20.095647 TestApp[807:166552] did will appear 2017-03-04 21:01:23.045754 TestApp[807:166612] WF: === Starting WebFilter logging for process TestApp 2017-03-04 21:01:23.046555 TestApp[807:166612] WF: _userSettingsForUser mobile: { filterBlacklist = ( ); filterWhitelist = ( ); restrictWeb = 1; useContentFilter = 0; useContentFilterOverrides = 0; whitelistEnabled = 0; } 2017-03-04 21:01:23.046995 TestApp[807:166612] WF: _WebFilterIsActive returning: NO
After a bit of googling and documentation research, I found that the most common reason for this is Apple Transport Security. But ATS can't be the issue, because even after setting NSAllowsArbitraryLoads to YES, I'm still getting the same output. Not to mention the fact that it was working for a while before adding ATS keys to my plist.
So what else could cause this to occur?
Here's my code:
- (void)viewWillAppear:(BOOL)animated { NSLog(@"doing will appear"); CGRect screenRect = [[UIScreen mainScreen] bounds]; self.webView = [[UIWebView alloc] initWithFrame:screenRect]; self.webView.delegate = self; self.webView.allowsInlineMediaPlayback = YES; NSString *htmlString = @"<html><head/><body><iframe src=\"http://www.google.com\" width=\"320\" height=\"568\" frameborder=\"0\" scrolling=\"yes\" allowfullscreen=\"true\"></iframe></body></html>"; [self.webView loadHTMLString:htmlString baseURL:nil]; NSLog(@"did will appear"); }