error code when using GIDSignIn.sharedInstance.cli

2019-06-28 09:31发布

问题:

I have an app which I used to use Auth2 to sign in using a client Id and client secret but now I have to use Google Sign In

I have followed the instructions as I understand them but when I build I get this error

-[__NSDictionaryI gtm_httpArgumentsString]: unrecognized selector sent to instance 0x17d49a40

I have added the framework I have imported the headers I have made a separate GoogleServices-info.plist with CLIENT_ID and REVERSED_CLIENT_ID

I have put the following code in my ViewDidLoad

GIDSignIn.sharedInstance.delegate = self;
GIDSignIn.sharedInstance.uiDelegate = self;
GIDSignIn.sharedInstance.clientID = @"55240XXXXX13-aduv6ncti03giqt46s3oq4t83plqck10.apps.googleusercontent.com" ;
GIDSignIn.sharedInstance.scopes=@[@"https://www.googleapis.com/auth/plus.login",@"https://www.googleapis.com/auth/plus.me"];

If I comment out the GIDSignIn.sharedInstance.clientID the app builds just fine but when I don't the app crashes with the above error.

I have linked the library -ObjC also.

Does anyone have any ideas as to how to work this out.

回答1:

You should import the following frameworks:

  • AddressBook.framework
  • SafariServices.framework
  • SystemConfiguration.framework
  • libz.tbd


回答2:

I tried all the solutions found on internet but couldn't solve this then I tried manual integration instead of pod and it worked for me.