Search code examples
iosxcodereact-nativecocoapods

CompileC Yoga.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler


I have been working on building a React native app and it's been working perfectly fine. A couple of days ago I got on an update for ios simulators and after the update all my installed apps were gone and all simulators were refreshed. When I try to build app on ios again I am getting this error. The full error is as follows ** BUILD FAILED **

The following build commands failed: CompileC /Users/muhammadaqeel/Library/Developer/Xcode/DerivedData/RICHLoad-grdecqvhxadocbfxxrsfifmleiew/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Yoga.build/Objects-normal/arm64/Yoga.o /Users/muhammadaqeel/Desktop/RICHLoad-main/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'Yoga' from project 'Pods') (1 failure)

My app is building perfectly fine on Android. I have tried multiple solutions but nothing seems to work in this case. One of the solution I tried is

rm -rf Pods
rm -rf ~/Library/Developer/Xcode/DerivedData/*
pod deintegrate
pod setup
I am using 
"react-native": "0.64.2",
xcode version : Version 14.3

I am bulding my app using this command

npx react-native run-ios --simulator="iPhone 14"

Solution

  • I have faced the same issue after updating the Xcode to the latest version.

    1. remove pods folder and podfile.lock
    2. install pods cd ios & pod install
    3. build project and you will get this error so for that apply step 4
    4. You need to replace single | to || in yoga file.

    Now, Build your project