Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GTMSessionFetcherService linker error when trying to build my xcode project

I'm using Cocoapods to install the latest GPG and used the latest XCode 7.3 and iOS SDK 9.3 but I couldn't manage to make the build of my project and stuck with these 5 linker error which I couldn't solve :

 "_OBJC_CLASS_$_GSDK_GTMSessionFetcherService", referenced from:
      objc-class-ref in gpg(GIPNetworkImage.o)
   objc-class-ref in libSignIn_external.a(GIDSignIn.o)

  "_GSDK_kGTMSessionFetcherStatusDomain", referenced from:
      -[GSDK_GTMOAuth2SignIn authCodeObtained] in libGTMOAuth2_external_external.a(GTMOAuth2SignIn.o)
  "_GSDK_GTMSessionFetcherAssertValidSelector", referenced from:
      -[GSDK_GTMOAuth2Authentication authorizeRequest:delegate:didFinishSelector:] in libGTMOAuth2_external_external.a(GTMOAuth2Authentication.o)
      -[GSDK_GTMOAuth2SignIn initWithAuthentication:authorizationURL:delegate:webRequestSelector:finishedSelector:] in libGTMOAuth2_external_external.a(GTMOAuth2SignIn.o)
  "_OBJC_CLASS_$_GSDK_GTMSessionFetcher", referenced from:
      objc-class-ref in libGTMOAuth2_internal_external.a(GTMOAuth2SignInInternal.o)
      objc-class-ref in libGTMOAuth2_external_external.a(GTMOAuth2Authentication.o)
      objc-class-ref in libGTMOAuth2_external_external.a(GTMOAuth2SignIn.o)
      objc-class-ref in gpg(GPGClearcutLogger.o)
      objc-class-ref in libSignIn_external.a(GIDSignIn.o)
      objc-class-ref in libSignIn_external.a(GIDRuntimeConfigFetcher.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I've even tried to add GTMSessionFetcherService source in my project but can't seem to fix this. Any idea?

Thanks

like image 476
Yanuar Tanzil Avatar asked Apr 07 '16 07:04

Yanuar Tanzil


2 Answers

I ran into a very similar build issue while trying to integrate Google Sign-In. The non-Cocoapods instructions mention adding GoogleSignIn.framework to your project, but they don't tell you that you need to link the rest of the frameworks in the sign-in SDK as well:

GoogleAppUtilities.framework
GoogleAuthUtilities.framework
GoogleNetworkingUtilities.framework
GoogleSignIn.framework
GoogleSymbolUtilities.framework
GoogleUtilities.framework
like image 139
acj Avatar answered Sep 30 '22 11:09

acj


All you have to do is add GoogleOpenSource.framework from the Google+ iOS SDK to libs

then

add GoogleOpenSource to your robovm.xml

Finally make sure the GoogleSignIn robopod is present

like image 30
Programmer Avatar answered Sep 30 '22 11:09

Programmer