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

by
Ali Hasan
axios cocoapods react-native xcode

The Problem:

"I’m encountering an error while compiling a React Native application on iOS. The error specifically involves the compilation of the Yoga library and occurs after updating iOS simulators. Despite implementing various solutions, the issue persists. I’m using React Native version 0.64.2, Xcode version 14.3, and building the app with the command "npx react-native run-ios –simulator="iPhone 14"." The full error message reads:
"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)
"
}

The Solutions:

Solution 1: Replace single pipe to double pipe in Yoga file

1. Remove the `pods` folder and `podfile.lock`.
2. Install pods using `cd ios && pod install`.
3. Build the project. You will encounter the same error.
4. Open the Yoga file and replace all single pipes (`|`) with double pipes (`||`).
5. Rebuild your project.

Q&A

How to fix – CompileC /Users/muhammadaqeel/Library/Developer/Xcode/DerivedData/RICHLoad/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 error?

You need to replace single | to || in yoga file. Now, Build your project

Video Explanation:

The following video, titled "CompileC Yoga.cpp normal arm64 c++ com.apple.compilers.llvm ...", provides additional insights and in-depth exploration related to the topics discussed in this post.

Play video

CompileC Yoga.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler I hope you found a solution that worked for you 🙂 The ...