'duplicate symbols for architecture x86_64' 更新 Firebase 消息时

'duplicate symbols for architecture x86_64' when updating Firebase Messaging

我的 iOS 应用使用 Firebase Messaging 和 Google Toolbox for Mac (GTM)。 GTM 以前直接包含在项目中的文件中(即不是 cocoapods)。但是,当通过 pods 安装 Firebase Messaging 时,它还会安装带有 pods 的 GTM,因为它是一个依赖项 - 因此我的项目中有两个 GTM 副本。

这是在Xcode中构建这个项目时出现的错误:

147 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

如何在直接用文件添加的 GTM 上使用用 pods 添加的 GTM?

要么删除 GTM 的单独副本,要么使用 Firebase without CocoaPods