-
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
Remove all UIWebView code? #661
Comments
I am not sure whether it is necessary to remove all the references to |
It's very important issue in the near future, because UIWebView been deprecated on iOS 13. |
That is fortunately not true. Things can be deprecated for a long time before they are removed or their usage affect App Store review. Which of course does not mean that the previously posted thoughts are wrong in any way - it just doesn't mean this has to lead to problems in the near future. It just definitely could. |
UIWebView has been deprecated for well over a year though, so I fear the "long time" is coming to an end very soon. So I'd second that this is a rather urgent issue. Here's a Twitter thread from one Apple dev on the topic: |
Just to set expectations: There's probably about 1 week of full-time work to be done by somebody familiar with the cordova-ios and WKWebView plugin codebases to resolve this issue. There is currently nobody working full-time on Cordova. We are all volunteers with limited time to contribute. |
Same email from Apple to uploading my app to TestFight. Im building iOS app from ionic 3/cordova and not use UIWebView, just WebView on my config.xml.
Any Solution?? |
Apple warns because cordova-ios has the UIWebView code, doesn't matter if you use it or not, the code is there. But it's a warning, we don't know for sure how long will take until Apple starts rejecting apps because of that. Once they start rejecting apps, the only solution will be to update your cordova-ios version and all plugins that have references to UIWebView to newer versions that don't have those references (they don't exist yet, that's what this issue is for). |
I created a compile-time decision for WKWebView over UIWebView in Pull Request #662 |
iOS 13 will be released around 17 September 2019. Could be that Apple will start rejecting apps after that date. Starting which version of cordova-ios is WKWevView being used as the default engine? I hear that UIWebView is not being used anymore and WKWebView is the default (but there are still traces of UIWebView), but since which version has this started? |
Apple is not going to start rejecting apps that use UIWebView with less than a month of notice. For the moment, it is safe to ignore the warning. No version of cordova-ios uses WKWebView by default. |
That's somewhat good news. I was referring to this: https://twitter.com/NiklasMaerz/status/1167031874738434048 where Niklas wrote:
I thought he was speaking about Cordova; but maybe he was speaking about a specific own app. |
Just to clarify. I was speaking about our own app with Cordova. We are using the WKwebview plugin and InAppBrowser.
I guess many app developers switched to WKwebview by now.
Am 31. Aug. 2019, 09:38, um 09:38, Marc <notifications@github.com> schrieb:
…> Apple is not going to start rejecting apps that use UIWebView with
less than a month of notice. For the moment, it is safe to ignore the
warning.
>
> No version of cordova-ios uses WKWebView by default.
That's somewhat good news.
I was referring to this:
https://twitter.com/NiklasMaerz/status/1167031874738434048 where Niklas
wrote:
> WKWebView is a plugin and UIWebView is part of the core platform.
This means we only use WKWebView but there are still unused references
of UIWebView in code.
I thought he was speaking about Cordova; but maybe he was speaking
about a specific own app.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#661 (comment)
|
Please follow the following link which will help you to move from UIwebview to WKwebview |
When cordova-ios migrates from UIWebView to WKWebView, how will LocalStorage in apps be handled? Will there be a way to migrate them over? |
That's a good question @spinninghamster! One could argue that a breaking change means no transition of user data, since e.g. plugins for LocalStorage and IndexedDB already exist (e.g., https://github.com/maklesoft/cordova-plugin-migrate-localstorage & https://github.com/pointmanhq/cordova-plugin-ionic-migrate-storage |
@fabuhelow Did that solution work for you? My project is running on Ionic 5.1.0. By default its should be using I dont think this issue is due to the app using UIWebview. Any reference of it in any Cordova plugins are causing these warnings. I hope we will be resolved or someone will give us an idea of when it will be resolved. I have a product release in early October 😞 |
I'd strongly consider prepping some time for this issue, what we don't want is it to suddenly become depreciated upon a later iOS 13 release and then the apps suddenly can't be built, if it's true that it'll take the best part of a week to fix, let's ensure backwards compatibility with older versions of Cordova and ensure that it can truly be fixed promptly when it happens. I'd further suggest pinning this issue to your repo. |
@sts-ryan-holton I've worked already on fixing this potential issue. See PR #663. |
Thanks @bpresles . For us working with Ionic, we will to wait for the Ionic team to upgrade |
This doesn't make sense. You install |
Yes. But |
Hi guys. A Strange Question I know in this forum.. But Are most people moving over to capacitor? Is it Safe to say that the developers who were focusing more on Cordova has taken a slightly different focus? OR Are we Still very serious about Cordova and its future? (Given Apple issues with soon to be deprecated UiWebView.) This isn't to blame the developers at all , Cordova is brilliant, Its just a simple question Since I now have to make a decision to leave Cordova and go with Capacitor that Ionic has introduced Since Apple Store issue. Business is pushing so its either or ... And I hate to leave Cordova since it has sooooo many awesome plugins and I have built my custom plugin for it which is working wonders. |
@RichardBoyder I'm not sure about Capacitor but for Cordova right now is driven by the community. |
Understood. Thanks for the reply. |
@suraneti what exactly do you mean by this? Does Apache no longer have anything to do with Cordova? |
I don't think this is the right place to discuss the Cordova vs Capacitor topic, since this is about an important Cordova issue to be discussed. I would like to add a short personal note about that nevertheless: Cordova still an active Apache project worth investing in. It's maintained by volunteers, but probably @suraneti is meaning that nobody is paid to work full-time on Cordova. This means (to me) you may need to be more patient and open to fixing issues and contributing yourself. |
All understood. We seriously need a fix for Cordova so we don't have issues when apple decides to cancel our binary uploads. So a very serious matter. Anyone who can comment and perhaps We can make a path to get it sorted so we don't have to worry about our Cordova apps being rejected in future.. its kind of unnecessary stress on us developers now and I really hope anyone who has Power here to fix this for us will look seriously at this issue. Please need a answer. Will we be able to rest in the knowledge that this will be sorted within next 2 months or so... ? I'm asking the Cordova Devs here who can do it and who can push a new major version of Cordova so we can all implement this? |
I wish I had the skills to fix this haha (I don't) ... otherwise I would be doing it right now... So many hundreds of people are relying on Cordova for their apps on store and I'm sure everyone is worried. |
It has already been fixed. Read: |
Unfortunately not (well it didn't work for me at least ). Moved to 5.1.0 ages ago when it came out and still get the apple warning. did everything recommended there and its still happening when push to store. |
Then you likely have a plugin that still references |
That is very true. Could be the case. I guess the plugin authors haven't updated their plugins yet to sort this out. But could certainly find and comment out I guess in the interim ... if it doesn't break the app. |
OK, the deadline is upon us:
|
Now: "Oh, a year of time ..all good" In November 2020: "Oh my god, we're running out of time! The 10 most popular Cordova plugins are all not updated yet!" |
@breautek Is there a way to search the plugins to find UIWebview api? What is the exact keyword? Just "UIWebview"? I think it is just a problem with the 3.1.0 version of inappbrowser plugin. |
In my case the following plugins caused the issue: facebook4 3.1.0 i tested it step by step. delete plugin by plugin one after the other until the message disappears. not nice, but I couldn't find out otherwise. |
I've recently created a new Cordova project specifically for iOS and I'm getting this issue. I'm using cordova-ios v5.1.1 and the only plugin I'm using is cordova-plugin-whitelist v1.3.4. What can I do about this? |
Add a wkwebview plugin such as this one. Do pay attention to the required config.xml settings. Do note that plugin is a stopgap, it won't be needed in the next major release of cordova-ios, which will only support wkwebview, and it will be built-in. If you have any further questions, don't be afraid to drop by our slack |
I want to give a big THANK YOU to ALL of the contributors (@erisu, @jcesarmobile, etc.) who have helped in any way to add the feature that removes UIWebView references at compile-time. Just this past week we began receiving emails from Apple about our existing app having UIWebView references even though we were using WKWebView to host our app. We were able to make a small version bump to FWIW, these are the plugins we have in our project: "plugins": {
"cordova-plugin-cartegraph-datepicker": {},
"cordova-plugin-device": {},
"cordova-plugin-safariviewcontroller": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-screen-orientation": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"cordova-sqlite-ext": {},
"cordova-plugin-network-information": {},
"cordova-plugin-geolocation": {},
"cordova.plugins.diagnostic": {
"ANDROID_SUPPORT_VERSION": "26.+"
},
"cordova-plugin-camera": {},
"com-sarriaroman-photoviewer": {},
"cordova-plugin-image-resizer": {},
"cordova-plugin-customurlscheme": {
"URL_SCHEME": "cgone",
"ANDROID_SCHEME": " ",
"ANDROID_HOST": " ",
"ANDROID_PATHPREFIX": "/"
},
"cordova-plugin-ionic-keyboard": {},
"cordova-ios-plugin-no-export-compliance": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-wkwebview-inject-cookie": {},
"cordova-plugin-cartegraph-cookie-master": {}
} I appreciate the volunteer work of Cordova maintainers and contributors who spend personal time outside of their day jobs to help keep things running smoothly for us! ❤️ |
@KevinKelchen Does this mean that anyone using cordova-ios: 5.1.1 and usage of latest plugins will be able to pass app submission sucessfully? Don't we have to remove UIWebView instances manually? |
@Biswas123, using If you use other plugins that themselves reference UIWebView, removing those UIWebView references has to be addressed separately by those plugins; updating We did not have any plugins that referenced UIWebView so updating |
Does anyone know how to check if a build still reference UIWebView like Apple do? I have tried to unzip my Even better, how to know which plugins still reference UIWebView? |
I don't know enough to comment on analyzing the app binary to know whether it will contain UIWebView usages that Apple won't like. As far as plugins go, you could search the Otherwise you could try uploading your build to Apple TestFlight. At least for us, we started receiving an email from Apple with every single upload to TestFlight. After we updated If you're not using TestFlight or you're not already getting emails from Apple about UIWebView from your uploads to TestFlight, this technique may not work well. But the "proof in the pudding" of whether your app contains any UIWebView-related stuff Apple wouldn't like is to actually run it through Apple's validation and see if it gets flagged (upload to TestFlight or submit the app to the App Store). |
Same problem. And this solution works for "cordova-plugin-ionic-webview" too or only "for cordova-plugin-wkwebview-engine"? I have installed the first. Thanks |
Must use a
Example
Still getting the warning? All official Cordova plugins were updated to use the flag. Using Ionic WKWebView plugin?
The other If you have any issue or usage questions with the Ionic plugin. Read their docs and request help from their support channels. |
People has started receiving this warning when submitting apps that have references to UIWebView.
Doesn't matter if they are using just WKWebView, as long as Apple sees "UIWebView" in the app code, they show the warning, and cordova-ios is full of "UIWebView" references. (Even react native, flutter and Capacitor users have received the warning)
There is currently no solution to this problem for Cordova apps.
So, instead of integrating WKWebView and making it possible to switch from UIWebView to WKWebView on runtime as it was planned, maybe we should just remove all UIWebView code on next major release?
There is no deadline, I've contacted an Apple developer that has been tweeting about moving to WKWebView to see if he can provide more information, will update if I get a response.Apple finally announced the deadline:
The text was updated successfully, but these errors were encountered: