iOS 由于 Google 登录而被拒绝。最新 Google 登录 (4.0.0) 进入 safari

iOS Rejection due to Google SignIn. Latest Google SignIn (4.0.0) goes to safari

我们的应用被苹果拒绝了

Design - 4.0

We noticed that the user is taken to Safari to sign in or register for an account when logging in with Google+, which provides a poor user experience.

Next Steps

Please revise your app to enable users to sign in with Google+ in the app. You can do this by updating to the latest Google+ SDK.

We recommend implementing the Safari View Controller API to display web content within your app. The Safari View Controller allows the display of a URL and inspection of the certificate from an embedded browser in an app so that customers can verify the webpage URL and SSL certificate to confirm they are entering their sign in credentials into a legitimate page.

我正在使用 pod 并拥有最新的 Google 登录库,而不是 GooglePlus。 库 4.0.0 (15/05/2016),在发行说明上说

https://developers.google.com/identity/sign-in/ios/release

Removes allowsSignInWithBrowser and allowsSignInWithWebView properties from GIDSignIn.

这意味着我没有办法强制它在 iOS 8 上具有默认的 iOS 9 行为(在应用程序中打开类似浏览器的 safari)。安装 Google App 或 Google+ App 没有区别。

尝试使用 cocoa pods 降级到 2.4.0,但它说

Analyzing dependencies [!] Unable to satisfy the following requirements:

  • Google/SignIn (= 2.4.0) required by Podfile
  • Google/SignIn (= 2.4.0) required by Podfile

有什么想法吗?

提前致谢

最后我设法做出更改并通过降级到 GoogleSignIn 3.0.0 获得批准 allowsSignInWithBrowser 和 allowSignInWithWebView 属性 我使用 with

allowsSignInWithBrowser = NO
allowsSignInWithWebView = YES

必须将 pod 文件更改为此才能构建所有内容(google 分析也使事情变得如此困难,导致依赖)。

希望 Google 工程师更新 SignIn 4.0.0,因为我不喜欢旧库,但我不能让我的应用程序被拒绝,直到 Google 更改库

pod 'Google/Analytics'

pod 'GoogleSignIn', '3.0.0'
pod 'Google/SignIn'
pod 'Google', '2.0.4'
pod 'GoogleAppUtilities'
pod 'GoogleAuthUtilities'
pod 'GoogleNetworkingUtilities'

祝你们好运, 感谢 Paulw11,他做了一个测试项目,在 iOS8 中看到了同样的问题。 此外,告诉评论者 App Store 中的其他(甚至是大型)应用程序使用 webview 即使 iOS9,不仅 iOS8,也没有帮助,因为他们说这不能成为其他应用程序的原因,他们也在努力拒绝其他人。

如果有任何更改,例如新的 GoogleSignIn 库,请重新回答!