简体   繁体   中英

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

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

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

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

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM