Reputation: 31
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" } }
Upvotes: 2
Views: 2079
Reputation: 31
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.
Upvotes: 1