My javascript Ad works fine with google chrome app over iphone, but if i try load that Ad using UIWebView or even Safari on iphone it never executed.
i am using this line of code to load the Ad: [self.webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@" http://sample_JavaScript_AD.html "]]];
i am testing this over iOS 10.
is there any updates from apple about safari & javascript ?
Your URL needs to include the full server address, not just the filename. For example:
self.webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.mywebserver.com/sample_JavaScript_AD.html"]]];
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.