IOS Swift,GIDSignIn.sharedInstance()。clientID上的Google SignIn运行时错误

时间:2016-10-09 21:37:17

标签: ios swift swift3 google-signin unrecognized-selector

我正在尝试在我的iOS项目中实施Google SignIn并在行中收到运行时错误:

GIDSignIn.sharedInstance().clientID = "mysecrectkey.apps.googleusercontent.com"
在AppDelegate中

。我得到的错误如下所示。我按照以下链接中提到的每个步骤进行操作,但仍然没有运气。

http://www.theappguruz.com/blog/integrate-google-signin-sdk-in-ios-application-using-swift

我也尝试在其他链接器标志部分添加-ObjC。请帮我解决这个问题。感谢

2016-10-09 17:16:57.754 GoogleLoginTest1[8996:611837] -[__NSDictionaryI gtm_httpArgumentsString]: unrecognized selector sent to instance 0x618000071a80
2016-10-09 17:16:57.758 GoogleLoginTest1[8996:611837] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryI gtm_httpArgumentsString]: unrecognized selector sent to instance 0x618000071a80'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010ce2234b __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x000000010c46621e objc_exception_throw + 48
    2   CoreFoundation                      0x000000010ce91f34 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
    3   CoreFoundation                      0x000000010cda7c15 ___forwarding___ + 1013
    4   CoreFoundation                      0x000000010cda7798 _CF_forwarding_prep_0 + 120
    5   GoogleLoginTest1                    0x000000010bb4272e -[GSDK_GTMSessionFetcherSessionDelegateDispatcher .cxx_destruct] + 11318
    6   GoogleLoginTest1                    0x000000010bb44551 -[GSDK_GTMSessionFetcherSessionDelegateDispatcher .cxx_destruct] + 19033
    7   GoogleLoginTest1                    0x000000010bb43fc4 -[GSDK_GTMSessionFetcherSessionDelegateDispatcher .cxx_destruct] + 17612
    8   GoogleLoginTest1                    0x000000010bb223ed _TFC16GoogleLoginTest111AppDelegate11applicationfTCSo13UIApplication29didFinishLaunchingWithOptionsGSqGVs10DictionaryVSC29UIApplicationLaunchOptionsKeyP____Sb + 685
    9   GoogleLoginTest1                    0x000000010bb22594 _TToFC16GoogleLoginTest111AppDelegate11applicationfTCSo13UIApplication29didFinishLaunchingWithOptionsGSqGVs10DictionaryVSC29UIApplicationLaunchOptionsKeyP____Sb + 180
    10  UIKit                               0x000000010da4068e -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 290
    11  UIKit                               0x000000010da42013 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4236
    12  UIKit                               0x000000010da483b9 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1731
    13  UIKit                               0x000000010da45539 -[UIApplication workspaceDidEndTransaction:] + 188
    14  FrontBoardServices                  0x00000001131ac76b __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
    15  FrontBoardServices                  0x00000001131ac5e4 -[FBSSerialQueue _performNext] + 189
    16  FrontBoardServices                  0x00000001131ac96d -[FBSSerialQueue _performNextFromRunLoopSource] + 45
    17  CoreFoundation                      0x000000010cdc7311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    18  CoreFoundation                      0x000000010cdac59c __CFRunLoopDoSources0 + 556
    19  CoreFoundation                      0x000000010cdaba86 __CFRunLoopRun + 918
    20  CoreFoundation                      0x000000010cdab494 CFRunLoopRunSpecific + 420
    21  UIKit                               0x000000010da43db6 -[UIApplication _run] + 434
    22  UIKit                               0x000000010da49f34 UIApplicationMain + 159
    23  GoogleLoginTest1                    0x000000010bb24cdf main + 111
    24  libdyld.dylib                       0x000000010fc4d68d start + 1
    25  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

1 个答案:

答案 0 :(得分:0)

您是否添加了其他链接器标志:-OjcC