[英]React Native Build Failed On IOS
I am facing the below issue while running the command npx react-native run-ios
in my Mac Os Monterey machine.在我的 Mac Os Monterey 机器上运行命令
npx react-native run-ios
时,我遇到了以下问题。 Could anybody please help me with this?有人可以帮我吗?
** BUILD FAILED **
The following build commands failed:
CompileC /Users/prashanth/Library/Developer/Xcode/DerivedData/myapp-akpvurjcnemajucrerqjfkzzxnng/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/RCTTurboModuleManager.o /Users/prashanth/Documents/REPO/app/node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'ReactCommon' from project 'Pods')
(1 failure)
I have the following piece of lines in the Pod file我在 Pod 文件中有以下几行
platform:ios, '9.0'
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
Version of Node: 15.14.0, React Native: 0.62.2, Xcode: 13.4.1节点版本:15.14.0,React Native:0.62.2,Xcode:13.4.1
Thank you!谢谢!
This solution worked for me.这个解决方案对我有用。 Do give it a try.
一定要试一试。
In iOS Folder go to Pods/Pods.xcodeproj/xcuserdata/project.pbxproj在 iOS 文件夹 go 到 Pods/Pods.xcodeproj/xcuserdata/project.pbxproj
Change all the 'IPHONEOS_DEPLOYMENT_TARGET = 11.0' to 'IPHONEOS_DEPLOYMENT_TARGET = 12.4'.将所有“IPHONEOS_DEPLOYMENT_TARGET = 11.0”更改为“IPHONEOS_DEPLOYMENT_TARGET = 12.4”。 save and run.
保存并运行。
Note: every time you pod install, it will change, so you have to do it again.注意:每次 pod install 都会改变,所以你必须再做一次。 If there is a better approach please do mention it.
如果有更好的方法,请务必提及。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.