2

I created the React project version 0.66.1. It's run well on Android but not in ios.

** BUILD FAILED ** The following build commands failed: CompileC /Users/nunggu/Library/Developer/Xcode/DerivedData/The_Shop_App-cbmtjvbjevexvvefqivkzkbmmaxa/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/arm64/SysUio.o /Users/nunggu/Documents/React\ Udemy/The_Shop_App/ios/Pods/RCT-Folly/folly/portability/SysUio.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RCT-Folly' from project 'Pods') (1 failure)

################################## { "name": "the_shop_app", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "start": "react-native start", "test": "jest", "lint": "eslint ." }, "dependencies": { "react": "17.0.2", "react-native": "0.66.1" }, "devDependencies": { "@babel/core": "^7.12.9", "@babel/runtime": "^7.12.5", "@react-native-community/eslint-config": "^2.0.0", "babel-jest": "^26.6.3", "eslint": "7.14.0", "jest": "^26.6.3", "metro-react-native-babel-preset": "^0.66.2", "react-test-renderer": "17.0.2" }, "jest": { "preset": "react-native" } }

asked Oct 26, 2021 at 15:26
4
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. Commented Oct 26, 2021 at 16:30
  • Use react-native-community.github.io/upgrade-helper there are only a few new versions support the M1, but it could also be a different issue Commented Oct 28, 2021 at 8:51
  • Still got errors. Commented Oct 29, 2021 at 2:58
  • check it react native project not build on MacBook M1 Commented Dec 2, 2021 at 18:52

1 Answer 1

1

After having tried many trials, I already found the solution. Just add the code to the Podfile in the ios folder as follows:

 use_flipper!({ 'Flipper-Folly' => '2.6.0', 'Flipper' => '0.112.0', 'Flipper-RSocket' => '1.4.0' })
 post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
 flipper_post_install(installer)
 find_and_replace("Pods/Headers/Private/RCT-Folly/folly/synchronization/DistributedMutex-inl.h",
 "atomic_notify_one(state)", "folly::atomic_notify_one(state)")
 find_and_replace("Pods/Flipper-Folly/folly/synchronization/DistributedMutex-inl.h",
 "atomic_wait_until(&state, previous | data, deadline)", "folly::atomic_wait_until(&state, previous | data, deadline)")
 end
end

Flipper compatibility version as the link: https://cocoapods.org/pods/Flipper.

ouflak
2,56310 gold badges46 silver badges53 bronze badges
answered Nov 4, 2021 at 11:06
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.