【发布时间】:2022-09-27 16:58:50
【问题描述】:
当 npx react-native run-ios 用于 React Native 0.70.1/Xcode 14/Monterey M1 时出现奇怪的错误:
The following build commands failed:
SwiftEmitModule normal arm64 Emitting\\ module\\ for\\ YogaKit (in target \'YogaKit\' from project \'Pods\')
但是在 Xcode 14 中构建成功,没有任何错误。尝试在 DEBUG 的构建设置中排除 arm64(当前为 i386),但未修复。还要在 pod 文件中添加以下块,但也没有修复:
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
# some older pods don\'t support some architectures, anything over iOS 11 resolves that
config.build_settings[\'IPHONEOS_DEPLOYMENT_TARGET\'] = \'12.0\'
end
end
标签: xcode react-native