Search code examples
iosswiftxcodereact-nativemobile

Use of bitwise '|' with boolean operands in React Native while building in xcode


enter image description here

It shows the above error in Xcode

Update the Yoga package to v1.19.0,

Use patch-package for development ease

Add postinstall script to package.json file with patch-package call

Edit react-native/ReactCommon/yoga/yoga/Yoga.cpp to fix the issue with incorrect operator used Execute npx patch-package react-native to generate .patch file Make sure to add patches/ directory to git


Solution

    • Replace the bitwise '|' operator with the logical '||' operator.

    References :