-
Notifications
You must be signed in to change notification settings - Fork 984
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
refactor: drop uiwebview & add wkwebview #773
Conversation
Codecov Report
@@ Coverage Diff @@
## master #773 +/- ##
==========================================
- Coverage 74.42% 74.26% -0.16%
==========================================
Files 11 11
Lines 1830 1815 -15
==========================================
- Hits 1362 1348 -14
+ Misses 468 467 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that the following code from CDVAppDelegate has no effect with WKWebView and can also be removed: https://github.com/apache/cordova-ios/blob/master/CordovaLib/Classes/Public/CDVAppDelegate.m#L28-L38
@@ -20,11 +20,7 @@ | |||
#import <Cordova/CDVPlugin.h> | |||
#import <Cordova/CDVWhitelist.h> | |||
|
|||
#if WK_WEB_VIEW_ONLY | |||
#define CDVWebViewNavigationType int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this get used anywhere by WKWebView or should it be removed entirely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CDVWebViewNavigationType
is used here.
CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.m
Outdated
Show resolved
Hide resolved
CordovaLib/Classes/Private/Plugins/CDVLocalStorage/CDVLocalStorage.m
Outdated
Show resolved
Hide resolved
5374728
to
fd54ace
Compare
905b1f1
to
cab13af
Compare
cab13af
to
94f46d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirmed that test app works properly in my Mac environment.
Supposing other plugins those using WK_WEB_VIEW_ONLY
flag will be updated soon according to this PR,
#773 (review)
I think there is no problem.
Keeping & forcing the WK_WEB_VIEW_ONLY flag to true will allows the IAB plugin @3.2.x to continue to function. This flag is kept only for the transitioning period. !! This flag will be removed on Cordova iOS's following next major (7.x)
8840270
to
8ace315
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a good idea to set WK_WEB_VIEW_ONLY
for now. We can remove that later (once InAppBrowser is ready).
I tested this PR in an app which is using WKWebView and IAB and it works fine.
@erisu now that this has been merged when can we look forward to next release? |
If you need this update now, I think your best bet at this point would be to install from GitHub, for example:
There should also be a nightly tag on npm. In general, we do not actively support unstable versions from master or from nightly. My understanding is that there are some breaking changes still in progress before we are ready to publish the new release. In case you have any questions about the upcoming release I would highly recommend you followup with us on Slack or on the mailing list, follow links in the footer of cordova.io or cordova.apache.org. |
* refactor: drop uiwebview & default to wkwebview * refactor: remove CDVLocalStorage * refactor: set CDVWebViewNavigationTypeOther as -1 * refactor: udpated & fixed cordova.js * refactor: force WK_WEB_VIEW_ONLY flag to true Note: * The WK_WEB_VIEW_ONLY flag is hardcoded to true. This is to ensure that the IAB@3.2.x plugin is forced to use WKWebView as this release does not support UIWebView. * The WK_WEB_VIEW_ONLY flag is kept only as part of a transitioning period. The flag will be removed in a later release.
Motivation, Context, Description
cordova-plugin-wkwebview-engine
CDVWebView
:CDV
. It is typically used for Cordova's internal class naming convention. If a plugin happens to uses the same class name, it will create conflicts. As well, if any changes were made on Cordova's end and happens to break the plugin, the plugin would need to make the corrections because the plugin decided to use and conflict with Cordova's internal naming convention.WK_WEB_VIEW_ONLY
preference options.Testing
npm t
cordova platform add
cordova requirements ios
cordova prepare ios
cordova build ios --release --device
cordova run ios --release --emulator
cordova plugin add cordova-plugin-inappbrowser@3.2.0
cordova build ios --release --device
Checklist