Google Plus登录集成错误iOS [英] Google Plus Login Integration Error iOS

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

问题描述

您好我正在尝试在我的iOS应用中集成google + login。我已按照链接的说明进行操作。

Hi i am trying to integrate google+ login on my iOS app. I've followed the instructions form this link.

示例工作正常,但是当我尝试在我的应用上实现时,它正在获取此

The examples are working fine but when i tried to implement on my app it is getting this

errorTerminating应用程序由于未捕获的异常'NSInvalidArgumentException',原因:'+ [NSBundle gpp_registerFonts]:无法识别的选择器发送到类0x16af620'

我添加了以下框架
图片
任何帮助

I have added the following frameworks Image Any help

代码:在我的视图的viewdidload中

Code: in viewdidload of my view

GPPSignIn *signIn = [GPPSignIn sharedInstance];
signIn.shouldFetchGooglePlusUser = YES;
signIn.shouldFetchGoogleUserEmail = YES;  // Uncomment to get the user's email

// You previously set kClientId in the "Initialize the Google+ client" step
signIn.clientID = kClientId;
signIn.scopes = [NSArray arrayWithObjects:
                 kGTLAuthScopePlusLogin, // defined in GTLPlusConstants.h
                 nil];
// Optional: declare signIn.actions, see "app activities"
signIn.delegate = self;

之后我添加此功能

- (BOOL)application: (UIApplication *)application openURL: (NSURL *)url sourceApplication: (NSString *)sourceApplication annotation: (id)annotation 
{
    return [GPPURLHandler handleURL:url
        sourceApplication:sourceApplication
                annotation:annotation];
}
- (void)finishedWithAuth: (GTMOAuth2Authentication *)auth
        error: (NSError *) error
{
    NSLog(@"Received error %@ and auth object %@",error, auth);
}

我在类GPPSignInButton的视图中添加了一个按钮。

And i add a button in my view of class GPPSignInButton.

推荐答案

问题出在-ObjC上。虽然我之前添加了-ObjC,但我知道为什么它不起作用但是当我删除并再次添加它开始工作。也许我先复制粘贴它,以便有任何空间或东西。

Hi the problem is with the -ObjC. Though i ve added the -ObjC earlier but i dnt know why it was not working but when i delete and again add it starts working. Maybe i copy-paste it earlier so there is any space or something.

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

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