在Swift中使用Google Nearby API的时候,遇到了以下错误
Undefined symbols for architecture arm64:
"OBJC_CLASS$_GNSMessageManager", referenced from:
objc-class-ref in TBGNSMessager.o
"OBJC_CLASS$_GNSMessage", referenced from:
objc-class-ref in TBGNSMessager.o
尝试在Other Linker Flags
中添加-ObjC
无果
最后找过这个解决方案,在Other Linker Flags
中添加$(inherited)
原文是这样说的:
If your Architectures and Valid Architectures are all right, you may check whether you have added $(inherited) , which will add linker flags generated in pods, to Other Linker Flags as below: enter image description here
关于$(inherited)
的用法可以看SwiftGG的文章