简体   繁体   中英

Google Analytics linker error without AdSupport.framework

I'm trying to build my iOS project which includes Google Analytics 3.03a. I've followed all the instructions about using the -force_load linker flags, but unless I include the AdSupport framework I always end up getting this error message when doing my debug build:

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

If I try it for my release build I get the same error but for the armv7 architecture.

Everything I'm reading tells me that if I do include the AdSupport framework then my app will get rejected, since I'm not serving ads, so I'm at a loss to know what to do.

This happens both with my actual project, and with a totally new blank test project that literally has no other linker flags:

OTHER_LDFLAGS = -force_load ${PROJECT_DIR}/GoogleAnalytics/libGoogleAnalyticsServices.a

I'm not using the Tag Manager at all, as far as I know.

Add the framework as optional. I submitted apps with Google Analytics without problems.

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