Yanuar Tanzil
Yanuar Tanzil

Reputation: 105

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

Upvotes: 5

Views: 3755

Answers (4)

user3474404
user3474404

Reputation: 46

I had this same issue for Xamarin.iOS. To solve, I simply updated my Xamarin.Google.iOS.SignIn package to the latest version (4.0.1.1) and updated Xamarin.Build.Download to latests (0.4.2).

Updating these two packages caused extra packages to be added to my project. I believe it's these extra packages that fixed the native linker errors I was getting (same exact errors as Yanuar Tanil).

Upvotes: 0

Irrd
Irrd

Reputation: 335

Add libsqlite3.dylib, libz.tbd, and AddressBook.framework to "Linked Frameworks and Libraries". This solved my issue.Also I copied these frameworks too.

GoogleAppUtilities.framework
GoogleAuthUtilities.framework
GoogleNetworkingUtilities.framework
GoogleSignIn.framework
GoogleSymbolUtilities.framework
GoogleUtilities.framework

Upvotes: 0

acj
acj

Reputation: 4821

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

Upvotes: 7

Programmer
Programmer

Reputation: 125445

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

Upvotes: 2

Related Questions