After reading https://reactnative.dev/docs/environment-setup, I created a react-native project using npx react-native init ***
.
It was successful, so, I tried to run the project using npx react-native run-ios
, and got the below error:
** BUILD FAILED **
The following build commands failed:
CompileC /Users/loser/Library/Developer/Xcode/DerivedData/test0205-dasunahpjpavelgmslwgmvjhesxy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/FlipperRSocketResponder.o /Users/loser/Documents/projects/test0205/ios/Pods/Flipper/xplat/Flipper/FlipperRSocketResponder.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Plug in your device via USB # Let's now set up an Android device to run our React Native projects. Go ahead and plug in your device via USB to your development machine. Now check that your device is properly connecting to ADB, the Android Debug Bridge, by running adb devices.
Once you have your React Native project initialized, you can run npx react-native run-ios inside the newly created project directory. If everything is set up correctly, you should see your new app running in the iOS Simulator shortly.
If you want to use react native 0.68 I recommend you upgrade Node to the last LTS. had same issue and upgrading to latest node worked for me.
Open the command prompt and type ipconfig to find your machine's IP address ( more info ). Make sure your laptop and your phone are on the same Wi-Fi network. Open your React Native app on your device. You'll see a red screen with an error.
It's because of use_flipper
in Podfile for iOS project.
use_flipper!
So, I was needed to indicate Flipper-Folly
version with use_flipper as
use_flipper!({ 'Flipper-Folly' => '2.3.0' })
It worked perfectly after that change.
Following Everest Climber answer
Change use_flipper! to use_flipper!({ 'Flipper-Folly' => '2.3.0' })
This worked for me. Hopefully, it works for you too
I could solve this issue after disabling Flipper in ios/Podfile.
This issue is caused by flipper-folly pod spec updates
Remove/uninstall react-native-cli, just use npx
Try this on react-native 0.63.4 (previous stable version).
Remember it doesn't work for latest 0.64.0 with XCode 12.5
Inside ios/Podfile replace use_flipper! with:
use_flipper!({ 'Flipper-Folly' => '2.5.3', 'Flipper' => '0.87.0','Flipper-RSocket' => '1.3.1' })
pod install --repo-update
npx react-native run-ios
if you don't need to use flipper or still getting some issues try commenting out flipper inside podfile and install pods using command
pod install --repo-update
#use_flipper!()
#post_install do |installer|
#flipper_post_install(installer)
#end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With