【问题标题】:Xcode build issue couldn't to find auto-linked frameworkXcode 构建问题找不到自动链接的框架
【发布时间】: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_BITCODEUser-Defined NO 的值
  • Enable BitcodeBuild 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


【解决方案1】:

您应该尝试为所有目标(包括您的应用目标和多个 PODS 目标)设置 ENABLE_BITCODE = NO

这是您可以在 Podfile 末尾添加的内容。

post_install do |installer|
  installer.project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings["ENABLE_BITCODE"] = "NO"
    end
  end
end

保存并发送pod install。 做一个干净的构建,看看它是否有帮助。

【讨论】:

  • 不幸的是似乎没有帮助:/
【解决方案2】:

如果我在Podfile 中注释掉use_flipper!(),则该问题与Flipper 有关,它可以工作。不幸的是,我还没有找到仅在本地设备上运行时禁用翻转器的好方法。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-09-20
    • 1970-01-01
    • 2011-11-15
    • 2017-07-26
    • 1970-01-01
    • 2014-07-25
    • 1970-01-01
    相关资源
    最近更新 更多