我已经使用最新的Cocapods版本集成了GAI.
当我在Debug配置中构建一切都运行正常.
但是,一旦我尝试归档应用程序,编译器将失败并显示以下消息:
Undefined symbols for architecture armv7: "_OBJC_CLASS_$_GAIDictionaryBuilder",referenced from: objc-class-ref in libWLCore.a(WLTrackingHelper.o) "_OBJC_CLASS_$_GAI",referenced from: objc-class-ref in libWLCore.a(WLTrackingHelper.o) "_kGAIScreenName",referenced from: +[WLTrackingHelper trackView:] in libWLCore.a(WLTrackingHelper.o) +[WLTrackingHelper resetView] in libWLCore.a(WLTrackingHelper.o) "_kGAIAnonymizeIp",referenced from: +[WLTrackingHelper prepareDefaultTracker:withAnonymization:withUnCaughtExceptions:withDebug:] in libWLCore.a(WLTrackingHelper.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command Failed with exit code 1 (use -v to see invocation)
由于它在Debug中起作用,所以我试图找出Debug和Release之间配置的区别在哪里.
我发现Release中的其他链接器标志是空的,而在Debug中包含GoogleAnalytics和其他框架和库的标志.
library not found for -lGoogleAnalyticsServices
之后,我添加了libPods,然后将libPods-GoogleAnalytics添加到“链接二进制库”部分,但错误仍然保持不变.
我投资了近两天的时间,但我找不到任何解决方案.