skip to Main Content

Just updated my XCode to Version 14.3 today and build is failing with below error in Yoga file

Use of bitwise '|' with boolean operands

Looks like we have some issues with 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 & cleaning build. Tried removing pods and node_modules as well. But nothing has helped.

2

Answers


  1. Chosen as BEST ANSWER

    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.


  2. General

    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.

    How to fix

    1. Update the Yoga package to v1.19.0, if possible.
    2. Use patch-package for development ease
      1. Add postinstall script to package.json file with patch-package call
      2. Edit react-native/ReactCommon/yoga/yoga/Yoga.cpp to fix the issue with incorrect operator used
      3. Execute npx patch-package react-native to generate .patch file
      4. Make sure to add patches/ directory to git
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search