Google Plus使用UIWebView登录iOS [英] Google Plus Sign in iOS using UIWebView

查看:242
本文介绍了Google Plus使用UIWebView登录iOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用谷歌+ SDK在我的应用程序中使用谷歌+登录。当用户点击登录按钮时,用户被重定向到safari。 (标准流程)。

I am using google+ sign in my app using the Google Plus SDK. When the user taps on the sign in button the user gets redirected to safari. (Standard Process).

然而,Apple似乎已经改变了一些规则。我的应用程序因此被拒绝,说明以下内容

However Apple seems to have changed some rules for this. My App was rejected due to this, stating the following


应用程序启动移动版Safari以完成登录Google+,然后返回
该应用程序。但是,使用它不应该退出应用程序以使用它。

The app launches mobile Safari to complete signing into Google+ before returning to the app. However, the use should not have to exit the app to use it.

要解决此问题,最好修改您的应用以允许
用户登录应用程序,为您的
应用程序创建另一种身份验证方法,或从使用您的应用程序中删除此要求

To resolve the issue, it would be appropriate to revise your app to allow the user to log through the app, to create another authentication method for your app, or to remove this requirement from using your app

其他人是否面临同样的问题并有解决方案?解决方法可能是使用UIWebView并使用OAuth访问令牌。但是,这无法为我提供单点登录功能。也有人知道如何使用访问令牌(没有SDK功能)共享图像。
我在sdk中找到了GTMOAuth2ViewControllerTouch文件,但仍然没有运气。任何人都可以帮我这个班吗?

Is someone else facing the same issue and has a solution? A work around could be using a UIWebView and use the OAuth Access Token. However this fails to provide me a Single Sign On feature. Also does anyone know how to share an image using the Access Token (Without SDK features). I have found the GTMOAuth2ViewControllerTouch file in the sdk but still no luck with it. Can anyone help me with this class?

推荐答案

更新



Google已发布支持WebView登录的新 iOS SDK ,以及其他几项更新和功能。 (感谢John Hjelmstad和Co为此工作)

Update

Google has released a new iOS SDK that does supports WebView Sign In, among several other updates and features. (Thanks to John Hjelmstad and Co for working on this)

我强烈反对使用过时的GTMAuth2Controller。如果您真的需要此功能,请将您的声音添加到官方谷歌主题。我们添加的声音越多,Google推出此功能的可能性就越大。目前,苹果公司拒绝所有强制用户从Safari迁移到您的应用程序以进行Google+登录的应用程序。尽管Apple知道Googles SDK就是这样做的(不要忘记Facebook做同样的事情,但不会让你的应用被拒绝)。

I recommend strongly against using the outdated GTMAuth2Controller. If you really want this feature please add your voice to the official Google thread. The more voices we add there the higher the chance that Google will introduce this feature. Currently Apple are rejecting all Apps that force the user to flip flop from Safari to your App for Google+ Sign In. Even though Apple are aware that this is how Googles SDK does this (Nevermind the fact that Facebook does the same but won't get your app rejected).

它的小小和蹩脚但不幸的是我们所能做的就是呼吁谷歌增加对此的支持。

Its petty and lame but unfortunately all we can do is appeal to Google to add support for this.

以下是谷歌对此问题的看法(我也抗议使用他们过时的控制器)

Here's what Google had to say about this issue (I also protested the use of their outdated controller)


大家好 - 在谷歌,我们的目标是尽可能多的
用户和开发者使用我们的服务。我们已经听到了很少有关于这种类型问题的
报告,但那些应用程序开发人员似乎已经通过Apple的
标准流程获得了b $ b的最终批准。

Hi all -- at Google, we aim to make our services available to as many users and developers as possible. We have heard a very small number of reports of problems of this type, but those app developers appear to have eventually gotten approval to launch by working through Apple’s standard process.

与此同时,我们将继续致力于改进登录机制。 I
确实同意Daniel不建议直接使用GTMOauth2ViewControllerTouch,
或等效的UIWebView技巧。 2014年10月16日

Meantime, we're continuing to work on improved mechanisms for login. I do agree with Daniel that direct use of GTMOauth2ViewControllerTouch, or the equivalent UIWebView trickery, is not recommended. Oct 16, 2014

这篇关于Google Plus使用UIWebView登录iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆