Xcode 11.0 Beta 4 构建并运行,但无法存档

Xcode 11.0 Beta 4 Builds and Runs, but can't Archive

我的 Swift 项目正常构建和运行,但由于以下警告导致每次尝试存档都失败并出现错误:

Could not find or use auto-linked library 'swiftFoundation'
Could not find or use auto-linked library 'swiftMetal'
Could not find or use auto-linked library 'swiftDarwin'
Could not find or use auto-linked library 'swiftUIKit'
Could not find or use auto-linked library 'swiftCoreFoundation'
Could not find or use auto-linked library 'swiftObjectiveC'
Could not find or use auto-linked library 'swiftDispatch'
Could not find or use auto-linked library 'swiftCoreImage'
Could not find or use auto-linked library 'swiftQuartzCore'
Could not find or use auto-linked library 'swiftCoreGraphics'
Could not find or use auto-linked library 'swiftCore'
  1. This issue 似乎密切相关,但 none 的建议解决方案似乎有帮助。
  2. 问题导航器中 this Pod 下出现错误。
  3. 我能够在 Xcode 11.0 Beta (1) 中存档此项目。
  4. .

我 运行 遇到了同样的问题,它看起来是由 Xcode beta 发行说明中的​​已知位码问题引起的:

Targets that contain Swift code with the Enable Bitcode build setting set to Yes fail to link correctly when built with the Archive action. (52804818)

Workaround: Add a custom build setting with the name LD_VERIFY_BITCODE, and set it to NO. Make a note to yourself to delete this custom build setting once this issue is resolved.

您需要添加 User-Defined 构建设置,因为它不会显示为正常的构建设置。单击构建设置中的 + 添加一个:

添加 User-Defined 设置后,一直滚动到构建设置的底部,找到您刚刚添加的设置,然后像这样修改它。