Getting linker error while integrating Gmail

I am trying to integrate Gmail for login.

I followed every step of the documentation, but received the following linker errors.

Note: - I use the manual SDK, not Cocoa Pods.

ld: warning: directory not found for option '-F/Users/harpreet/Documents/FacebookSDK' Undefined symbols for architecture x86_64: "_GSDK_NSClassFromString", referenced from: l010 in GoogleSignIn(GIDSignIn.o) l059 in GoogleSignIn(GIDSignIn.o) "_OBJC_CLASS_$_GSDK_GTMOAuth2Authentication", referenced from: objc-class-ref in GoogleSignIn(GIDSignIn.o) objc-class-ref in GoogleSignIn(GIDAuthentication.o) "_OBJC_CLASS_$_GSDK_GTMOAuth2Keychain", referenced from: objc-class-ref in GoogleSignIn(GIDSignIn.o) "_OBJC_CLASS_$_GSDK_GTMOAuth2SignIn", referenced from: objc-class-ref in GoogleSignIn(GIDSignIn.o) objc-class-ref in GoogleSignIn(GIDAuthentication.o) "_OBJC_CLASS_$_GSDK_GTMOAuth2ViewControllerTouch", referenced from: objc-class-ref in GoogleSignIn(GIDSignIn.o) "_OBJC_CLASS_$_GSDK_GTMSessionFetcher", referenced from: objc-class-ref in GoogleSignIn(GIDSignIn.o) objc-class-ref in GoogleSignIn(GIDRuntimeConfigFetcher.o) "_OBJC_CLASS_$_GSDK_GTMSessionFetcherService", referenced from: objc-class-ref in GoogleSignIn(GIDSignIn.o) "_OBJC_CLASS_$_GSDK_OpenInChromeController", referenced from: objc-class-ref in GoogleSignIn(GIDSignIn.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) 
+8
ios xcode
source share
3 answers

Be sure to add:

  • GoogleUtilities.framework
  • GoogleSymbolUtilities.framework
  • GoogleAuthUtilities.framework
  • GoogleNetworkingUtilities.framework
  • GoogleAppUtilities.framework

All necessary

And those that are indicated in the official documentation:

  • AddressBook.framework
  • SafariServices.framework
  • SystemConfiguration.framework

If you use the Google icon, import:

  • GoogleSignIn.bundle

Find official documentation here

+11
source share

enter image description here

add all this from sdk (google_signin_sdk_4_0_0) to your project

GoogleAppUtilities.framework

GoogleAuthUtilities.framework

GoogleNetworkingUtilities.framework

GoogleSymbolUtilities.framework

GoogleUtilities.framework

GoogleSignIn.framework

GoogleSignIn.bundle

Switch to

build phases -> binary link with libraries

add this infrastructure

SafariServices.framework

AddressBook.framework

SystemConfiguration.framework

also add two files

Lib ++. TBD

libz.tbd

+4
source share

Make sure you also add:

 GoogleAuthUtilities.framework GoogleNetworkingUtilities.framework GoogleAppUtilities.framework GoogleSymbolUtilities.framework SafariServices.framework 

Also, if you need, add

 GoogleSignIn.bundle 

to the bundle resource.

It works for me

0
source share

All Articles