-
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
Optional compile-time decision for WKWebView over UIWebView #662
Conversation
Codecov Report
@@ Coverage Diff @@
## master #662 +/- ##
==========================================
- Coverage 74.24% 74.19% -0.06%
==========================================
Files 11 11
Lines 1833 1837 +4
==========================================
+ Hits 1361 1363 +2
- Misses 472 474 +2
Continue to review full report at Codecov.
|
I've tested the PR and doesn't work, the problem is the |
Please try to re-add the iOS platform. Then it should work. Forgot to mention that part ;) |
Yeah, removing and adding the platform back works if you have the preference, but I think the |
Hi @fjaeger, Did you tried to upload to the iTunes Connect one app with your cordova-ios platform? Thanks, |
This is probably not related. Please check if you use any plugins that reference UIWebView. |
I also couldn't get this to work, sadly. If I search my Xcode codebase for the project, I still see a WHOLE bunch of UIWebView references (in Cordova itself, not just plugins) - as far as I'm aware, Apple just scans your code and sends the warning if it finds refs to UIWebView, right? |
This works if you have the preference before adding the platform, or if you remove and add it again. The compiler flags will prevent Apple from seeing the UIWebView references. |
This looks like it could be a major pitfall for people not super familiar with Cordova. Assuming we document this option, I think a big bold warning statement would be needed. Any way we could have Cordova build show a warning if someone changes the preference without removing and adding back cordova-ios? |
I think the PR should be changed so it updates the project without removing and re-adding the platform if possible. If not possible, then document it. |
@@ -659,6 +660,7 @@ | |||
PRODUCT_NAME = Cordova; | |||
SDKROOT = iphoneos; | |||
SKIP_INSTALL = YES; | |||
WK_WEB_VIEW_ONLY = 0; |
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.
This should reflect the config.xml preference, instead of always being 0.
I am seeing the same issue as jcesarmobile, setting the preference It only sets the https://github.com/apache/cordova-ios/pull/662/files#r342301814 @fjaeger is there a way to read the config.xml preference instead of putting 0 here? |
I've modified your prepare script to make prepare edit the projects without the need to removing and adding the platform back. |
As Apple seems to become super picky about the usage of UIWebView APIs, this PR adds a preference (
WKWebViewOnly
) to config.xml, that makes sure that all traces ofUIWebView
are left behind on compile-time.This PR should resolve #661