gpt4 book ai didi

ios - GPPSignIn 因 NSInvalidArgumentException 而崩溃

转载 作者:可可西里 更新时间:2023-11-01 05:54:00 25 4
gpt4 key购买 nike

我尝试使用 Google+ Sign-In for iOS 为 iOS 设置 Google+ 登录指导。之前我也关注过Google Platform Getting Started指导。

我的代码如下:

- (void)didTapSignIn {
GPPSignIn *signIn = [GPPSignIn sharedInstance];
signIn.shouldFetchGoogleUserEmail = YES;
signIn.clientID = PTCGoogleClientID;
signIn.scopes = @[ kGTLAuthScopePlusLogin ];
signIn.attemptSSO = YES;
signIn.delegate = self;
[signIn authenticate];
}

但是我没有让 Google 登录对话框,而是收到了这条错误消息:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: state)'

有关崩溃日志的更多详细信息:

0   CoreFoundation                      0x03654916 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x032f28d9 objc_exception_throw + 44
2 CoreFoundation 0x035450bc -[__NSDictionaryM setObject:forKey:] + 940
3 MyApp 0x0015172c -[GPPSignIn oauth2URLWithParams:] + 450
4 MyApp 0x001518f4 -[GPPSignIn doOAuthLoginWithParams:] + 107
5 MyApp 0x00151d24 -[GPPSignIn authenticateInteractivelyWithParams:] + 91
6 MyApp 0x00151f96 -[GPPSignIn authenticateMaybeInteractively:withParams:] + 610
7 MyApp 0x0014ecb1 -[GPPSignIn authenticate] + 49
8 MyApp 0x0001c8e4 -[MyAppController tapGoogleLogin:] + 132
9 libobjc.A.dylib 0x033057bf -[NSObject performSelector:withObject:withObject:] + 84
10 UIKit 0x016dc1fe -[UIApplication sendAction:to:from:forEvent:] + 99
11 UIKit 0x016dc190 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64
12 UIKit 0x01804786 -[UIControl sendAction:to:forEvent:] + 69
13 UIKit 0x01804ba3 -[UIControl _sendActionsForEvents:withEvent:] + 598
14 UIKit 0x01803e0d -[UIControl touchesEnded:withEvent:] + 660
15 UIKit 0x0172814a -[UIWindow _sendTouchesForEvent:] + 874
16 UIKit 0x01728c25 -[UIWindow sendEvent:] + 791
17 UIKit 0x016f30a5 -[UIApplication sendEvent:] + 242
18 UIKit 0x0170075e _UIApplicationHandleEventFromQueueEvent + 13892
19 UIKit 0x016d6b64 _UIApplicationHandleEventQueue + 1561
20 CoreFoundation 0x0357930f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
21 CoreFoundation 0x0356dc99 __CFRunLoopDoSources0 + 249
22 CoreFoundation 0x0356d1f8 __CFRunLoopRun + 952
23 CoreFoundation 0x0356cb7b CFRunLoopRunSpecific + 443
24 CoreFoundation 0x0356c9ab CFRunLoopRunInMode + 123
25 GraphicsServices 0x04ded500 GSEventRunModal + 192
26 GraphicsServices 0x04ded33d GSEventRun + 104
27 UIKit 0x016dadee UIApplicationMain + 3727
28 MyApp 0x00026cad main + 141
29 libdyld.dylib 0x03aeeac5 start + 1
30 ??? 0x00000001 0x0 + 1

有人可以指出我的代码有什么问题吗?谢谢。

最佳答案

刚刚下载了 Apple 于 6 月 17 日发布的 XCode 6 Beta 2。然后,我重试了代码,它运行良好。

关于ios - GPPSignIn 因 NSInvalidArgumentException 而崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24158078/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com