我在我的 Podfile 中添加了一个 pod,并在构建时遇到了编译器错误:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_CLLocation", referenced from:
objc-class-ref in MoPubAdapter(GADMAdapterMoPub.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
然后我去Build Settings > Target > Debug > Other Linker Files
手动添加-framework
和"CoreLocation"
。
编译器不再抱怨了。我认为它们被遗忘为吊舱的先决条件。
现在我不喜欢手动更改此值的事实。如果 Cocoapods ie 再次覆盖这个值,我可能会忘记这样做。有没有办法让我将CoreLocation
框架添加到 Podfile 以便 Cocoapods 负责包含它?
谢谢