cordova-plugin-googleplus
cordova-plugin-googleplus copied to clipboard
Depreciated UIWebView APIs error from Apple
It looks like the plugin is causing a warning from Apple about the UIWebView API usage:
ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs .
issue is just for cordova-ios, I used version https://github.com/apache/cordova-ios/pull/663
to remove UIWebView. When pushing an app without the googleplus plugin, there is no warning. Warning when adding plugin.
So this plugin will also need an update to remove UIWebView code.
Will this be removed from future versions of the plugin?
Any quick way to remove it when building the binary?
I could not see any code involving UIWebView with this plugin (refer the source code at src/ios). Should be some other plugin that is causing this issue, like inappbrowser
@bhatiaravi I can confirm I'm seeing the same issue as @ngocnguyenvan26 If I remove cordova-plugin-googleplus from the build, it passes the test. If I put it back in it fails ITMS-90809.
@EddyVerbruggen Seems that ios pod dependencies needs to be updated. Similar issue is in https://github.com/firebase/FirebaseUI-iOS/issues/771
@megaza That probably means this bit needs to be updated and tested:
https://github.com/EddyVerbruggen/cordova-plugin-googleplus/blob/f02d3f7b3bed753b62bf5c73479e8c6712ed799b/plugin.xml#L109-L112
Does anyone perhaps feel like taking a stab at it? :)
@EddyVerbruggen Google introduced API changes in GoogleSignIn, requires code changes (someone of your side should do that).
In addition there is a popup message on login "App Wants to Use google.com to Sign In - This allows the app and website to share information about you."
Is there any additional validation or configuration needed to remove the popup message?
This project is open source, so anyone can change the could. Doesn't have to be anyone from "my side" (aka me).
I don't think you can get rid of that popup btw, but you might want to Google it, because it's not specific to this plugin: any native app that wants to open a browser will prompt the user AFAIK.
@EddyVerbruggen Yes, but I think that it is not something that community should wait for, as Apple is rejecting builds and hot fix is quickly needed.
Attached you can find the patch file (Apple approved the release): Update-GoogleSignIn-to-v5.txt
Everything seems to work fine, but please double check and apply the patch (without my PR).
I'd be happy to help (and appreciate the patch!), but as I'm currently in the middle of moving to a new house I have 0 time.
https://github.com/EddyVerbruggen/cordova-plugin-googleplus/pull/671, thanks, @megaza
Thanks for doing this @leogoesger .
Is this likely to be merged soon?
Pretty please 🙏🏻
@doginthehat no problem, I have been using my fork. It works pretty well.
@leogoesger I've tried your fork and there's a compilation error in the google plus update branch [13:22:38]: ▸ Compiling GooglePlus.m [13:22:38]: ▸ ❌ /Users/ionic/builds/project-0/platforms/ios/InstantScripts/Plugins/cordova-plugin-googleplus/GooglePlus.m:89:58: expected ';' after expression [13:22:38]: ▸ signIn.presentingViewController = self.viewController
@leogoesger I've added a fix suggestion in your PR code
I'm using 8.4.0 and Apple still complains about UIWebView.
Pods in this version:
<pod name="GoogleSignIn" spec="~> 5.0.2"/>
<pod name="GoogleUtilities" spec="~> 6.5.1"/>
~~@EddyVerbruggen are you still moving or can we get this patch put in place? We are fast approaching the moment of crisis in April when Apple starts rejecting apps because of this.~~ Actually it appears as though the patch above has been applied in 8.4.0 of this plugin... I was running 8.2.0
I updated the cordova-plugin-googleplus from 8.2.0 to 8.4.0, removed plugins and ios platform, and reinstalled ios platform … now I’m getting the following three build failures:
- Property 'presentingViewController' not found on object of type GIDSignin *'
- No visible @interface for 'GIDSignIn' declares the selector 'handleURL:' GooglePlus.m
- No visible @interface for 'GIDSignIn' declares the selector 'restorePreviousSignin' GooglePlus.m
Clearly the problem is, even after I pod repo update && rm -rf platforms/ios && rm -rf plugins && ionic cordova platform add ios && ionic cordova platform prepare ios
... if I then cd platforms/ios && pod dependencies
I get GoogleSignIn (4.4.0)
listed... which should be 5.0.2 according to what I see in node_modules/cordova-plugin-googleplus/plugin.xml
... so why does pod dependencies not realize that?
Found it, config.xml
also needed a line updated <pod name="GoogleSignIn" version="5.0.2"/>
...
iOS build is failed, when I'm using 8.4.0.
issue is The following build commands failed: CompileC /Users/mymac/Library/Developer/Xcode/DerivedData/****/x86_64/GooglePlus.o /User/mymac/***/cordova-plugin-googleplus/GooglePlus.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
@EddyVerbruggen HELP
I still have this issue Nov 2020, UIWebView Deprecations. Using latest version 8.5.1
I am not able to upload my app to Store
@tomavic It is probably related to some other plugin where it is using UIWebView API. Search for "UIWebView" or "UIDelegate" with Xcode thru the project and upgrade the matching plugin to a newer version where it is not using deprecated API.
@megaza Hey
I run grep -r "UIWebView" .
and it's showing googleplus and facebook4, I removed facebook4 plugin for now. And remaining is this plugin.
I am using cordova 9, cordova-ios 5.1.1, I tried to build with cordova-ios@6 as well
I am using both this and facebook4 plugin and no complaints from Apple. cordova-ios 6.1.1. Relevant part from config.xml:
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
<preference name="WKWebViewOnly" value="true" />
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
This really driving me crazy for over a week.
Here is what I found when I search for UIWebView
in the whole project. I don't believe I should edit CordovaLib code!!
here is my environment
onic:
Ionic CLI : 6.11.11 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : ionic-angular 3.9.5
@ionic/app-scripts : 3.2.2
Cordova:
Cordova CLI : 9.0.0 ([email protected])
Cordova Platforms : ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 20 other plugins)
Utility:
cordova-res (update available: 0.15.2) : 0.15.1
native-run : 1.2.2
System:
Android SDK Tools : 26.1.1 (/Users/tooma/Library/Android/sdk)
ios-deploy : 1.11.3
ios-sim : 8.0.2
NodeJS : v10.22.1 (/usr/local/Cellar/node@10/10.22.1/bin/node)
npm : 6.14.6
OS : macOS Catalina
Xcode : Xcode 12.0.1 Build version 12A7300
Search for a string isn't a good method (and never was), because of conditional compilation (as you can see on your own screen)
Guess what
I am using latest version of this plugin including cordova 9 and cordova-ios 6.
But my App is keep getting rejected for the same reason.
The real problem is, I have to submit the APP to the store and increasing the build number so that I can wait to see if Apple is going to send a rejection email or not! It's disappointing and I don't know what to try else!
@tomavic as mentioned above, do you have this in your config.xml ?
<preference name="WKWebViewOnly" value="true" />
The code in your own screenshot has a conditional code which depends on this preference.
@faugusztin Hey buddy,
Yes I have added the following inside config.xml
the ios part.
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
<preference name="WKWebViewOnly" value="true" />
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
After many searches, and checking here I found the following plugins which have the UIWebView references. I created an issue here
It's working fine. That config is enough. Update to newest version of cordova-ios and just wipe and recreate your platforms and plugins folders.
@sebastian-zarzycki-es I've updated my environment to latest and it failed because of : this issue
Ionic:
Ionic CLI : 6.11.11 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : ionic-angular 3.9.5
@ionic/app-scripts : 3.2.2
Cordova:
Cordova CLI : 10.0.0
Cordova Platforms : ios 6.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 19 other plugins)
Utility:
cordova-res (update available: 0.15.2) : 0.15.1
native-run : 1.2.2
System:
Android SDK Tools : 26.1.1 (/Users/pekandesigns/Library/Android/sdk)
ios-deploy : 1.11.3
ios-sim : 8.0.2
NodeJS : v10.22.1 (/usr/local/Cellar/node@10/10.22.1/bin/node)
npm : 6.14.6
OS : macOS Catalina
Xcode : Xcode 12.0.1 Build version 12A7300
@sebastian-zarzycki-es I've updated my environment to latest and it failed because of : this issue
Ionic: Ionic CLI : 6.11.11 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : ionic-angular 3.9.5 @ionic/app-scripts : 3.2.2 Cordova: Cordova CLI : 10.0.0 Cordova Platforms : ios 6.1.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 19 other plugins) Utility: cordova-res (update available: 0.15.2) : 0.15.1 native-run : 1.2.2 System: Android SDK Tools : 26.1.1 (/Users/pekandesigns/Library/Android/sdk) ios-deploy : 1.11.3 ios-sim : 8.0.2 NodeJS : v10.22.1 (/usr/local/Cellar/node@10/10.22.1/bin/node) npm : 6.14.6 OS : macOS Catalina Xcode : Xcode 12.0.1 Build version 12A7300
I think this has to do in some of your dependencies using uiwebview still. Had a rough time finding which lib was it. In my case it was the old firebase push notif lib, i had to use the latest one which is firebaseX