tuarua / WebViewANE

WebView Adobe Air Native Extension for macOS 10.10+, Windows Desktop, iOS 9.0+ and Android 19+. This ANE provides access to a more modern webview from AIR.
Apache License 2.0
183 stars 53 forks source link

run WebViewANE/example the page was blank (https restriction on OSX - baidu.com specific) #127

Closed 1395881288 closed 6 years ago

1395881288 commented 6 years ago
1
when i open a picture it can show
2
1395881288 commented 6 years ago
3
tuarua commented 6 years ago

That error means you need to use https urls eg https://www.baidu.com

see https://github.com/tuarua/WebViewANE/issues/97

https://stackoverflow.com/questions/32631184/the-resource-could-not-be-loaded-because-the-app-transport-security-policy-requi

1395881288 commented 6 years ago

I used https urls was https://www.baidu.com 1

tuarua commented 6 years ago

I investigated more. baidu.com doesn't work properly with WKWebview. when I go to https://www.baidu.com it redirects to http://

Here is the fix

settings.userAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/604.5.6 (KHTML, like Gecko) Version/11.0.3 Safari/604.5.6";

1395881288 commented 6 years ago

I added "settings.userAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/604.5.6 (KHTML, like Gecko) Version/11.0.3 Safari/604.5.6", it works very well,thank you.

1