Google Consent SDK - 链接器错误

时间:2018-06-05 11:04:45

标签: ios xcode admob linker-errors

我目前正在尝试整合Google Consent SDK,但是只要我打电话

[PACConsentInformation.sharedInstance requestConsentInfoUpdateForPublisherIdentifiers:@[ @"pub-0123456789012345"]

我在Xcode控制台中收到以下错误:

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

我已经在Stackoverflow上搜索了几个小时,我尝试了各种各样的事情,例如Enabling BitcodeUpdating Linker Flags with $(inherited),以及其他一些事情,例如添加建议框架和libz在流行的问题/答案中找到,但仍然没有运气。

我已经在Xcode 8.3.2,Xcode 9.0和Xcode 9.2中尝试了我的项目,所有这些都显示了这个错误。

我有什么遗失的吗? 我现在完全陷入困境。 谢谢你的帮助。

1 个答案:

答案 0 :(得分:3)

转到构建阶段 - > Link Binary With Libraries然后添加 PersonalizedAdConsent框架