简体   繁体   中英

Xcode 6 : Linker error with Google Analytics

I'm currently getting this error

Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_ASIdentifierManager", referenced from: objc-class-ref in libAdIdAccess.a(TAGActualAdIdAccess.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Added Frameworks:

  • AdSupport
  • CFNetwork
  • libsqlite3.0.dylib
  • libz.dylib
  • libAdIdAccess.a
  • libGoogleAnalticsServices.a

Tried evertyhing, also added -lAdIdAccess and -lGoogleAnalytics to other linker flag.

It happens with version 3.10 of the SDK.

Hope you can give me some advices to resolve this issue.

For implementing Google analytics you also have to import these two frameworks.

SystemConfiguration.framework

CoreData.framework

With libsqlite3.0.dylib,libz.dylib,libGoogleAnalticsServices.a

A great tutorial on Google analytics

Thanks.

Check if your target is linked with libGoogleConversionTracking.a. This may be a related library. I linked to this library to resolve this exact error.

This answer arrives some years later but I just came across the same error as you.

I tried adding AdSupport.framework in the xcodeproj file for the target I am building under "Build Phases" -> "Link Binary With Libraries". Adding that framework solved the error.

Source: https://firebase.google.com/support/guides/analytics-adsupport

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