plugins
plugins copied to clipboard
[webview_flutter] - Added WebViewSetting option for iOS
Added limitsNavigationsToAppBoundDomains that is an optional setting for iOS
Added limitsNavigationsToAppBoundDomains property to WebViewSettings that can be used on iOS. This will give the developer access to some JavaScript APIs that are disabled by default.
List which issues are fixed by this PR. You must list at least one issue. (flutter/issues/89530)
Pre-launch Checklist
- [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
- [x] I read the Tree Hygiene wiki page, which explains my responsibilities.
- [x] I read and followed the relevant style guides and ran the auto-formatter. (Note that unlike the flutter/flutter repo, the flutter/plugins repo does use
dart format.) - [x] I signed the CLA.
- [x] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g.
[shared_preferences] - [x] I listed at least one issue that this PR fixes in the description above.
- [x] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
- [x] I updated CHANGELOG.md to add a description of the change.
- [x] I updated/added relevant documentation (doc comments with
///). - [x] I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test exempt.
- [x] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel on Discord.
Thanks for the submission! As explained in the contributing guide, all behavioral changes need tests. Please let us know when you’ve updated the PR with tests and we can take a look.
@GauteHaugen Are you planning on updating this PR to add tests?
@stuartmorgan, sorry about that. It has been a lot of work lately, so I forgot about it. Will add tests over the weekend
@stuartmorgan I have now pushed some tests. I noticed that there had also been some changes to the folder structure as well as the package being split into 4 since the initial PR. I have pulled down the latest version, and have added all changes again with tests. I also updated the version for each package. so at the moment, some workflows fail due to the packages not being released.
Should I move this PR into 4 different PRs, one for each package?
@stuartmorgan, I have now followed the steps in the "Changing federated packages" guide. The first PR #4464 is up with the changes for flutter_webview_platform_interface. I have also as the guide explained changed this PR to include dependency_overrides until the other PRs have been merged
@stuartmorgan, while writing the iOS native unit test. I found out that limitsNavigationsToAppBoundDomains is not a setting that can change after the WKWebView has been initialized. So I have rewritten the implementation to be set before the WKWebView is initialized. I have also changed the flutter unit test to reflect the changes, as well as added iOS native unit tests. I have also updated #4464 with the changes
Status update from triage: The iOS conversion to Dart is still in progress, so this is still on hold.
跳转其他url无法触发onPageFinished
https://github.com/flutter/flutter/issues/93732 is complete, so this is unblocked; you'll just need to update the implementation for the new Dart-based implementation.
@GauteHaugen Are you still planning on updating this to the new implementation?
@stuartmorgan I can take a look at it over the weekend. Is the plan to still implement it as discussed in the comments above?
I believe so. @bparrishMines Is the thread above still the model for the v4 structure?
I think this feature is still blocked because it requires the feature to set a platform specific CreationParams. This is done in the v4 api being worked on in https://github.com/flutter/flutter/issues/94051. But, it's still not available in the current version.
I think this feature is still blocked because it requires the feature to set a platform specific
CreationParams. This is done in the v4 api being worked on in flutter/flutter#94051. But, it's still not available in the current version.
That was going to be my next question. When I was looking at the code, I could not find an easy way to override CreationsParams. Then I will wait for https://github.com/flutter/flutter/issues/94051 to land before implementing
Sorry about that; I forgot that platform-specific creation params were not supported before, and conflated it with just changing CreationParams in general (which was one of the things we could still actually change in v3).
Any update on this issue since September? Really would love this option as PWAs / Service Workers cannot work inside of a flutter WebView it seems. Looking at v4 of flutter WebView seems like I should be able to set it via WebKitWebViewControllerCreationParams and seems to be what is being referred to in the last comment. Also the referenced issue that that was being waited on is closed.
webview_flutter v4 has finally been completed, which included fixing the platform interface to that we can make additions to it without breaking changes. That means that this is finally unblocked! Thanks for your patience while we worked through the restructuring.
webview_flutter v4 uses a Dart-first implementation, where the platform channel boundary is as close as possible to the underlying host APIs, and plugin logic is written primarily in Dart rather than the host language. That means that this PR will need to be updated to follow that model. Please let us know if you have questions about updating to v4 (and https://github.com/flutter/plugins/pull/6881 may be useful as an example of adding a feature in the v4 structure).
I'm going to go ahead and mark this as a draft since it needs to be reworked for v4, just to get it off of our review queue. Please mark it as ready for review once that's been done. Thanks!
We've just completed the migration of the plugin code to the flutter/packages repository, as described in https://flutter.dev/go/flutter-plugins-repo-migration, and this repository is now being archived. Unfortunately that means that all in-progress PRs here must be moved to flutter/packages.
Please see our instructions for an explanation of how to move your PR, and if you have any issues moving your PR please don't hesitate to reach out in the #hackers-ecosystem channel in Discord.
Our apologies that your PR was caught in this one-time transition. We're aware that it's disruptive in the short term, and appreciate your help in getting us to a better long-term state!