googlesamples / google-services

A collection of quickstart samples demonstrating the Google APIs for Android and iOS
https://developers.google.com
Apache License 2.0
3.07k stars 2.53k forks source link

Remove UIWebview API from ios implementation #454

Closed hbarylskyi closed 4 years ago

hbarylskyi commented 4 years ago

Step 3: Describe the problem:

Seems like GoogleSignIn pod is still using UIWebview API. I'm working on react-native app which uses https://github.com/react-native-community/google-signin. This library is using GoogleSignIn SDK. AppStore does not accept iOS apps using UIWebview anymore.

Could you transfer the SDK to WKWebView?

Information regarding GoogleSignIn using UIWebview is taken from here: https://github.com/react-native-community/google-signin/issues/851.

Steps to reproduce:

  1. Try to upload an app using GoogleSignIn to the AppStore.

Observed Results:

Binary gets rejected by AppStore.

Expected Results:

The app to get an update.

ydv0121 commented 4 years ago

+1

mayur43s commented 4 years ago

This is happening as I'm still seeing the use of UIWebView and the app is getting rejected on App Store here's the terminal output with pod update

Installing AppAuth (1.3.0)
Installing GTMAppAuth (1.0.0)
Installing GTMSessionFetcher 1.4.0 (source changed to `https://cdn.cocoapods.org/` from `trunk`)
Installing GoogleSignIn 5.0.2 (was 4.4.0 and source changed to `https://cdn.cocoapods.org/` from `trunk`)

Now when I do grep -r "UIWeb" . It gives this output:


./Pods/AppAuth/Source/AppAuth.h:    for the auth request. `UIWebView` and `WKWebView` are explicitly *not*
./Pods/AppAuth/README.md:for the auth request. `UIWebView` and `WKWebView` are explicitly *not*
./Pods/GoogleSignIn/CHANGELOG.md:- Supports sign-in via UIWebView rather than app switching to a browser,```
akinncar commented 4 years ago

+1

ashu090990 commented 4 years ago

I am using Google Sign-In in my App and the app is getting rejected on App Store, received mail with following message

ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability.

I used "grep -r UIWebView ." command in project Terminal and getting Google Sign-In related files using UIWebView.

vonovak commented 4 years ago

@samtstern you seem to be active around this repo, can you confirm if you're still using UIWebView? Thank you!

akinncar commented 4 years ago

I solved this issue in my project updating my SDK 4.4.0 to 5.0.0.

Ussing "grep -r UIWebView ." command at therminal, returns some files with contents UIWebView only comments at the code or binary files. I'm using React Native 0.59.9, and this version contains UIWebView in React lib.

The I do:

Remove four files on Xcode
{PROJECT_NAME}/Libraries/React.xcodeproj/React/Views

RCTWebView.h

RCTWebView.m

RCTWebViewManager.h

RCTWebViewManager.m

Remove two lines on Xcode
Pods/Development Pode/React/Support Files/React-umbrella.h

#import "React/RCTWebView.h"

#import "React/RCTWebViewManager.h"

By update Google SDK, I needed update react-native-google-signin 1.2.2 to 2.1.1, code is very similar.

samtstern commented 4 years ago

Hey all. Google Sign In versions 4 and earlier are compiled with references to UIWebView, which Apple has been discouraging the use of. It looks like they've just begun rejecting apps that include these references, although I'm not sure exactly what the policy is. The solution is to upgrade to the latest Google Sign In SDK (Version 5) which does not make use of UIWebView.

If you are using React Native you may be getting UIWebView references from RN, which is unrelated to Google Sign In: https://github.com/facebook/react-native/issues/26255

mayur43s commented 4 years ago

@samtstern I'm getting that issue with GoogleSignIn (5.0.2) so it's still not solved. FYI, I'm not using React Native.

vonovak commented 4 years ago

@mayur43s I'm guessing you're using some other dependency that uses UIWebView, then.

mayur43s commented 4 years ago

@vonovak Can you please see my comment above. grep -r "UIWeb" . clearly shows that GoogleSignIn is using a reference to UIWebview along with other dependent pods.

hbarylskyi commented 4 years ago

I’m also thinking that GoogleSignIn still has UIWebView. If I remember correctly, I was able to upload a build only after I removed googlesignin dependency. I’ll try to check this again today to be 100% sure.

vonovak commented 4 years ago

@mayur43s those references do not point to code usage but only to comments, and my understanding is that apple checks the application code after you upload the ipa, where there should be no comments included. -but I might be wrong

ydv0121 commented 4 years ago

Hey all. Google Sign In versions 4 and earlier are compiled with references to UIWebView, which Apple has been discouraging the use of. It looks like they've just begun rejecting apps that include these references, although I'm not sure exactly what the policy is. The solution is to upgrade to the latest Google Sign In SDK (Version 5) which does not make use of UIWebView.

If you are using React Native you may be getting UIWebView references from RN, which is unrelated to Google Sign In: facebook/react-native#26255

issue from Google SDK when i use Google SIgn in SDK (5.0.2) which is latest.my app was rejected by the apple. if i remove google SDK then my build successfully uploaded.

mayur43s commented 4 years ago

@vonovak But the app is getting rejected due to reference even although that's not in code. @ydv0121 yes when you remove it the app gets submitted successfully but when you use that pod the build gets rejected.

ydv0121 commented 4 years ago

@vonovak But the app is getting rejected due to reference even although that's not in code. @ydv0121 yes when you remove it the app gets submitted successfully but when you use that pod the build gets rejected.

yes so is it confirm issue from the google signin SDK?

mayur43s commented 4 years ago

@vonovak But the app is getting rejected due to reference even although that's not in code. @ydv0121 yes when you remove it the app gets submitted successfully but when you use that pod the build gets rejected.

yes so is it confirm issue from the google signin SDK?

Yes but @vonovak & @samtstern doesn't believe us. 😁

samtstern commented 4 years ago

I will see if we can get the word UIWebView removed from the pod's CHANGELOG.md even though I don't think that should be ending up in the ipa file.

hbarylskyi commented 4 years ago

I reinstalled @react-native-community/google-sign-in, latest version, ran pod install, archived and the app was accepted.

mayur43s commented 4 years ago

@samtstern Yes but that word is being used some other dependency files as well:

./Pods/AppAuth/Source/AppAuth.h:    for the auth request. `UIWebView` and `WKWebView` are explicitly *not*
./Pods/AppAuth/README.md:for the auth request. `UIWebView` and `WKWebView` are explicitly *not*
./Pods/GoogleSignIn/CHANGELOG.md:- Supports sign-in via UIWebView rather than app switching to a browser,

Mainly in this file AppAuth.h

samtstern commented 4 years ago

Thanks @mayur43s

I can definitely see how AppAuth.h is causing an issue ... that is code that would be inside the app. But I can't see how README.md and CHANGELOG.md from pods would be causing an issue.

Does anyone have more information from Apple about their rejection? Can you prove it's coming from a reference in a file within GoogleSignIn?

hbarylskyi commented 4 years ago

@samtstern see my comment above