objective-c – 面对谷歌加登录IOS的问题

objective-c – 面对谷歌加登录IOS的问题,第1张

概述我在整合google plus日志时遇到问题 我收到以下错误: 2015-02-17 20:03:39.377 SIR[288:14344] -[__NSDictionaryM gtm_httpArgumentsString]: unrecognized selector sent to instance 0x14d57a202015-02-17 20:03:39.383 SIR[288:143 我在整合Google plus日志时遇到问题
我收到以下错误:

2015-02-17 20:03:39.377 SIR[288:14344] -[__NSDictionaryM gtm_httpArgumentsstring]: unrecognized selector sent to instance 0x14d57a202015-02-17 20:03:39.383 SIR[288:14344] *** Terminating app due to uncaught exception 'NSinvalidargumentexception',reason: '-[__NSDictionaryM gtm_httpArgumentsstring]: unrecognized selector sent to instance 0x14d57a20'

我以前用于谷歌登录的代码如下:

-(voID) setGooglePlusbuttons {UIbutton *GooglePlusSignInbutton = [UIbutton buttonWithType:UIbuttonTypeCustom] ;UIImage *backgroundbuttonImage = [UIImage imagenamed:@"Google.png"];GooglePlusSignInbutton.frame = CGRectMake(0.0f,400,150,50);GooglePlusSignInbutton.TitleLabel.textcolor = [UIcolor whitecolor];GooglePlusSignInbutton.TitleLabel.Font = [UIFont boldSystemFontOfSize:11.0f];GooglePlusSignInbutton.TitleLabel.numberOflines = 2;GooglePlusSignInbutton.TitleLabel.shadowcolor = [UIcolor darkGraycolor];GooglePlusSignInbutton.TitleLabel.shadowOffset = CGSizeMake(0.0f,-1.0f);[GooglePlusSignInbutton setTitle:NSLocalizedString(@"",@"")                         forState:UIControlStatenormal];[GooglePlusSignInbutton setBackgroundImage:backgroundbuttonImage                                   forState:UIControlStatenormal];[self.vIEw addSubvIEw:GooglePlusSignInbutton];[GooglePlusSignInbutton addTarget:self action:@selector(signInGoogle) forControlEvents:UIControlEventtouchUpInsIDe];}- (voID)signInGoogle {GPPSignIn *signIn = [GPPSignIn sharedInstance];signIn.delegate = self;signIn.shouldFetchGoogleUserEmail = YES;signIn.clIEntID = KclIEntID;signIn.scopes = [NSArray arrayWithObjects:kGTLAuthScopePlusLogin,nil];signIn.actions = [NSArray arrayWithObjects:@"http://schemas.Google.com/ListenActivity",nil];[[GPPSignIn sharedInstance] authenticate];}- (voID)signOut {[[GPPSignIn sharedInstance] signOut];}

并在应用程序委托

- (BOol)application: (UIApplication *)application openURL: (NSURL *)url sourceApplication: (Nsstring *)sourceApplication annotation: (ID)annotation {return [GPPURLHandler handleURL:url sourceApplication:sourceApplication annotation:annotation];}

我在顶部kclIEntID声明

static Nsstring * const KclIEntID=@"xxxxxxxxxxxxxxx.apps.Googleusercontent.com";

我已经尝试过了,但我无法找到问题,即我哪里出错了.

解决方法 我遇到了与Swift相同的问题,我认为你必须在构建设置上启用一些标志并启用一些库.

>转到构建设置/链接/其他链接器标志并添加不带引号的“-ObjC”.这假设您正在使用一些“头文件”来映射Google框架和Swift方法.>转到Build Phases> link Binary with librairIEs> >添加其他,转至de /usr/lib目录并选择“libz.dylib”>编译

总结

以上是内存溢出为你收集整理的objective-c – 面对谷歌加登录IOS的问题全部内容,希望文章能够帮你解决objective-c – 面对谷歌加登录IOS的问题所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1059081.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-25
下一篇 2022-05-25

发表评论

登录后才能评论

评论列表(0条)

保存