Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting linker error while Gmail Integration

Tags:

xcode

ios

I am trying to integrate Gmail for login .

I have followed every step of there documentation but getting the following linker errors.

Note:- I am using manual SDK rather than 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)
like image 757
Harry Avatar asked Jun 03 '16 10:06

Harry


2 Answers

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

Go to

build Phases -> link binary with Libraries

add this framework

SafariServices.framework

AddressBook.framework

SystemConfiguration.framework

also add this two files

libc++.tbd

libz.tbd

like image 58
Subhojit Mandal Avatar answered Nov 19 '22 01:11

Subhojit Mandal


Make sure to also add:

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

All required

And the ones listed in the official documentation:

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

If you use the Google icon, import:

  • GoogleSignIn.bundle

Find the official documentation here

like image 33
Constantin Saulenco Avatar answered Nov 19 '22 03:11

Constantin Saulenco