且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Xcode 12 问题:“找不到构建输入文件"- 在 React Native 应用程序上构建以供发布

更新时间:2023-11-19 19:37:04

Build forAny iOS Device"(例如,存档",因为您要上传到 AppStore):

  • 从排除的架构"中删除 arm64
  • 从 VALID_ARCHS 中删除 x86_64
  • 将 arm64 添加到 VALID_ARCHS

构建设置"、项目和目标上的所有这些都发生了变化.如果您想为模拟器构建,请执行相反的路径:

  • 将 arm64 添加到排除的架构"
  • 从 VALID_ARCHS 中删除 arm64
  • 将 x86_64 添加到 VALID_ARCHS

这对我有用.

When I try to do an archive build for "any iOS device", I receive this error:

Build input file cannot be found: '/Users/.../Library/Developer/Xcode/DerivedData/[app]-czrkuohjfzuzxxfobfoyptxhyoyo/Build/Intermediates.noindex/ArchiveIntermediates/[app]/InstallationBuildProductsLocation/Applications/[Product Name].app/[Product Name]'

I received this same error when building for an iOS simulator, but this post fixed it - Problems after upgrading to Xcode 12:ld: building for iOS Simulator, but linking in dylib built for iOS, architecture arm64.

I am also receiving a warning concerning the architectures that may or may not be relatable to the error:

None of the architectures in ARCHS (arm64) are valid. Consider setting ARCHS to $(ARCHS_STANDARD) or updating it to include at least one value from VALID_ARCHS (arm64, armv7s, armv7) which is not in EXCLUDED_ARCHS (arm64).

Build for "Any iOS Device" (for example, "Archive" because you want to upload to AppStore):

  • Delete arm64 from "Excluded Architectures"
  • Delete x86_64 from VALID_ARCHS
  • Add arm64 to VALID_ARCHS

All this changes on both "Build Settings", project and target. And if you want to build for simulator do the inverse path:

  • Add arm64 to "Excluded Architectures"
  • Delete arm64 from VALID_ARCHS
  • Add x86_64 to VALID_ARCHS

That works for me.