ios - 无法修复“无法找到或使用自动链接库”
问题描述
我有一个使用 Swift 和 pods(firebase) 构建的应用程序。我有 18 个三角形和 100 个红色错误,这是以前没有的。它们仅在我尝试归档我的应用程序时出现。
我已经尝试了所有这些(添加搜索路径,添加空白 swift 文件,删除框架路径)
将 Swift 静态库与 Objective-C 项目一起使用时会出错
ld: warning: Could not find or use auto-linked library 'swiftFoundation'
ld: warning: Could not find or use auto-linked library 'swiftsimd'
ld: warning: Could not find or use auto-linked library 'swiftGLKit'
ld: warning: Could not find or use auto-linked library 'swiftMetal'
ld: warning: Could not find or use auto-linked library 'swiftSpriteKit'
ld: warning: Could not find or use auto-linked library 'swiftDarwin'
ld: warning: Could not find or use auto-linked library 'swiftUIKit'
ld: warning: Could not find or use auto-linked library 'swiftCoreFoundation'
ld: warning: Could not find or use auto-linked library 'swiftObjectiveC'
ld: warning: Could not find or use auto-linked library 'swiftCore'
ld: warning: Could not find or use auto-linked library 'swiftQuartzCore'
ld: warning: Could not find or use auto-linked library 'swiftModelIO'
ld: warning: Could not find or use auto-linked library 'swiftDispatch'
ld: warning: Could not find or use auto-linked library 'swiftAVFoundation'
ld: warning: Could not find or use auto-linked library 'swiftCoreMedia'
ld: warning: Could not find or use auto-linked library 'swiftCoreGraphics'
ld: warning: Could not find or use auto-linked library 'swiftCoreImage'
ld: warning: Could not find or use auto-linked library 'swiftCoreAudio'
环境:Xcode 11 beta 4 / 目标:iOS 12 及以上
解决方案
苹果在已知问题部分提到了类似的问题:
包含 Swift 代码且 Enable Bitcode 构建设置设置为 Yes 的目标在使用 Archive 操作构建时无法正确链接。
并给我们一个解决方法:
添加一个名为 LD_VERIFY_BITCODE 的自定义构建设置,并将其设置为 NO。解决此问题后,请记下删除此自定义构建设置。
推荐阅读
- c++ - 为什么我不能将 lambdas 分配给函数参数作为默认值?
- excel - VBA“for”使用组合框在单元格中搜索以匹配
- ethereum - Solidity 时间旅行测试失败
- java - Java jackson序列化任何具有一定深度的对象以避免递归
- typescript - 如何申报,财产申报的两种选择?
- python - 在 Ubuntu 中播放 Python 音频
- c# - 获取并连接 CheckedBoxComboBox 中的所有选定项
- python - 如何将一列列表放入R中的线性回归模型参数中?
- r - 在 R 中,解析不同长度的 JSON 对象嵌入了一个包含其他变量的 csv 文件
- c# - 运算符 equal 的操作数与方法“op_Equality”的参数不匹配