简体   繁体   中英

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. 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

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

Thank you!

This solution worked for me. Do give it a try.

In iOS Folder go to Pods/Pods.xcodeproj/xcuserdata/project.pbxproj

Change all the 'IPHONEOS_DEPLOYMENT_TARGET = 11.0' to 'IPHONEOS_DEPLOYMENT_TARGET = 12.4'. save and run.

Note: every time you pod install, it will change, so you have to do it again. If there is a better approach please do mention it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM