Reputation: 3873
Just updated my Xcode to Version 14.3 today and the build is failing with the following error in the Yoga file:
Use of bitwise '|' with boolean operands
Looks like we have some issues with the iOS Yoga package. I don't want to rollback to lower version again. If someone can help to get over it, that would be nice.
I tried removing cached data and derived data and cleaning the build. Tried removing pods and node_modules as well. But nothing has helped.
Upvotes: 94
Views: 61036
Reputation: 3873
I resolved it by putting 2 vertical bars "||" instead of one "|" in the code where it is failing.
Then cleared the build and it is working fine now on Xcode 14.3. I Hope this helps someone.
Edit:
Above one is temporary solution. By using following solution we do not need to make change on every npm installation. It is suggested by @Carl G. @Mykola Odnosumov 's Solution in this thread is also helpful, it is similar solution. Thank you @Carl G and @Mykola Odnosumov
https://github.com/facebook/react-native/issues/36758#issuecomment-1496210081
npx patch-package react-native
Upvotes: 156
Reputation: 511
This issue's been fixed in Yoga v1.19.0
Check out this commit dated Apr 12, 2022, and release v1.19.0 dated May 21, 2021.
patch-package
for development ease
postinstall
script to package.json
file with patch-package
callreact-native/ReactCommon/yoga/yoga/Yoga.cpp
to fix the issue with incorrect operator usednpx patch-package react-native
to generate .patch
filepatches/
directory to gitUpvotes: 51