Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't open specific links on iOS #94

Closed
wardweistra opened this issue Jun 6, 2018 · 3 comments
Closed

Can't open specific links on iOS #94

wardweistra opened this issue Jun 6, 2018 · 3 comments

Comments

@wardweistra
Copy link

Dear developers,

I love your webview plugin for the Oauth flow in my app. It works on Android, however I am having trouble on iOS, both on the emulator and real device. The following links result in a white webview:

Both do work on Android. Also the https://thehyve.nl does load, leading me to believe it might be redirect related.
You should be able to reproduce this by just taking the example application in this repository and putting the above links in there.

Would really appreciate your suggestions!

Best regards,
Ward

@wardweistra
Copy link
Author

OK, I now understand it could only load websites on my domain and https on iOS by default. Since I need arbitrary domains, I had to add the following to ios/Runner/Info.plist:

<key>NSAppTransportSecurity</key>
	<dict>
		<key>NSAllowsArbitraryLoads</key>
		<true/>
		<key>NSAllowsArbitraryLoadsInWebContent</key>
		<true/>
	</dict>

NSAllowsArbitraryLoadsInWebContent is for iOS 10+ and NSAllowsArbitraryLoads for iOS 9.

https://stackoverflow.com/questions/41557155/wkwebview-how-to-display-links-to-http-pages

@brunovsiqueira
Copy link

@wardweistra I added this key but it is still not working. The callbacks of FlutterWebViewPlugin are never called, and I am using onUrlChanged.listen. Can you help me please?

@wardweistra
Copy link
Author

@brunovsiqueira I'm afraid not. Above is all I know, which worker at that point in time with those iOS versions. Perhaps a solution mentioned in #229 or else open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants