Skip to content

Instantly share code, notes, and snippets.

@shalyf
Last active July 9, 2020 08:17
Show Gist options
  • Save shalyf/907a517eb45ffae14b36fac9afdc0125 to your computer and use it in GitHub Desktop.
Save shalyf/907a517eb45ffae14b36fac9afdc0125 to your computer and use it in GitHub Desktop.
Undefined symbols for architecture arm64

在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的文章

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment