【发布时间】:2021-08-31 08:54:47
【问题描述】:
我已经为这个问题苦苦挣扎了好几天了 :( 在模拟器中构建我的 iOS 应用程序时,它工作正常(调试构建),但是一旦我尝试构建到我的 iPhone 11(v 14.5. 1) 我的构建失败并出现以下错误:
ld: warning: Could not find or use auto-linked framework 'GoogleDataTransport'
ld: warning: Could not find or use auto-linked framework 'FirebaseRemoteConfig'
ld: warning: Could not find or use auto-linked framework 'FirebaseCore'
ld: warning: Could not find or use auto-linked framework 'Protobuf'
ld: warning: Could not find or use auto-linked framework 'FirebaseInstallations'
ld: warning: Could not find or use auto-linked framework 'GoogleToolboxForMac'
Undefined symbols for architecture arm64:
我使用的是 Xcode 12.5。我尝试了各种建议,例如:
- 在
Build Settings中添加LD_VERIFY_BITCODE到User-DefinedNO的值 -
Enable Bitcode在Build Settings中,值为NO - 删除派生数据
- 卸载和安装 Pod
- 干净的构建
- 确保
Framework Search Paths看起来正确。我只有$(inherited) - 将
$(inherited)更改为recursive - 确保我打开了 .xcworkspace 文件而不是 .xcodeproj
还有其他可能的解决方案吗?
【问题讨论】:
-
您使用的是 Apple Silicon mac 吗?
-
不 - 我在 MacBook Pro(15 英寸,2018 年)上使用 OSX 11.2.3 (Big Sur)
-
您是否为所有目标(包括您的应用目标和多个 PODS 目标)执行了
Build Settings > Enable Bitcode > NO? -
Pod 中的所有目标都有
Build Settings > Enable Bitcode > YES,但这是很多 pod 目标。所有人都应该有NO吗?如果是这样,我如何确保新添加的 Pod 也有NO? -
值得一试。
标签: ios swift xcode build-settings xcode-build-settings