Google plus API在登录时不会返回到应用程序 [英] Google plus API doesn't return to app on login

查看:180
本文介绍了Google plus API在登录时不会返回到应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

显然,我必须错过一些东西。



当我按下我的Google +按钮时,会打开safari并提示登录。一切都很好,直到我完成登录procress。 Safari告诉我无法打开页面 - 由于地址无效,Safari无法打开页面。它永远不会让我回到我的应用程序,但保持Safari浏览器打开并进入google.com。



我认为这将会照顾到这一点,但断点不是'不要用这种方法。也许我误解了它的工作原理。


$ b

   - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation :(id)注释
{
return [GPPURLHandler handleURL:url sourceApplication:sourceApplication annotation:annotation];

$ / code>

感谢您提供的任何帮助
<请注意项目中的Bundle标识符,并且您已使用

解决方案

控制台> https://code.google.com/apis/console 。他们两个都应该是一样的。之后,请确保您在应用程序plist文件中的URL类型中设置了相同的URL Schemes。

Obviously I must be missing something.

When I press my Google + button, it opens up safari and prompts for the login. Everything is fine until I complete the login procress. Safari tells me "Cannot open the Page -- Safari cannot open the page because the address is invalid". It never takes me back to my app, but keeps Safari open and goes to google.com.

I was thinking this would take care of that, but break points aren't ever going off in this method. Maybe I'm misunderstanding how it works.

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
    return [GPPURLHandler handleURL:url sourceApplication:sourceApplication annotation:annotation];
}

Thanks for any help you can provide

解决方案

Take look to the Bundle Identifier that is in your project and that you have registered with https://code.google.com/apis/console . Both of them should be same. After that make sure also you have set that same URL Schemes in URL Types in your application plist file.

这篇关于Google plus API在登录时不会返回到应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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