ARM Mac - unable to run react-native run-ios - react-native

I ran following commands to create a project
react-native init test
cd iOS
pod install
later from project home directory
react-native run-ios
I get following error
** BUILD FAILED **
The following build commands failed:
CompileC /Users/sp/Library/Developer/Xcode/DerivedData/test-ausxdgmizfvufjajqpwlgewxxhww/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-Folly.build/Objects-normal/x86_64/DistributedMutex.o /Users/sp/Documents/GitHub/Self/test/ios/Pods/Flipper-Folly/folly/synchronization/DistributedMutex.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
need help resolving this.

xCode 12.5 is the problem here. It seems to break react-native builds. Solutions are mentioned here - https://github.com/facebook/react-native/issues/31179#issuecomment-830184757
looks like you're on react-native 0.64
update podfile to use
use_flipper!('Flipper' => '0.75.1', 'Flipper-Folly' => '2.5.3')
update package.json to use
"react-native": "facebook/react-native#cf8a364767df830d7255339741350bb53ab1a68a"
If that does not work,
remove use_flipper! from your podfile (disables flipper)
run pod install
clean and rebuild

Related

Build command failed after running existing project on mac using npx react-native run-ios command

I tried to run an existing react-native project on mac to create ios build but i've been getting into an unusual error as mentioned below. I don't know what RCT-Folly does as i am new to react-native but i think the error is related to RCT-Folly, I tried many other stack answers but couldn't solve it
Here is a picture of the error
I have tried the other solution like creating a fresh projects and copying files, also tried reinstalling cocoapods,
If there is some other thread that you guys think i should try please let me know
Stuck at this for more than 3 days now!
Update:
After downgrading react native version it is now showing this error:
CompileC /Users/admin/Desktop/MTM/mindToMindfull\ 2/ios/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-Core.build/Objects-normal/x86_64/RCTJSThread.o /Users/admin/Desktop/MTM/mindToMindfull\ 2/node_modules/react-native/React/Base/RCTJSThread.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-Core' from project 'Pods')
RCT-Folly is an iOS Cocoapod library. Try cleaning your project first. From the project root, run (for Yarn)
watchman watch-del-all && rm -f yarn.lock; rm -rf node_modules,
then
yarn
cd ios && rm -rf ~/Library/Caches/CocoaPods Pods ~/Library/Developer/Xcode/DerivedData/; rm Podfile.lock; pod deintegrate; pod setup; pod install && cd ..
yarn ios
I haven't used npm in awhile. But for 2 and 4, use npm install and npx react-native run-ios
Solved by downgrading react-native version 0.66.4
then installing pods and build was a success.

react-native-firebase/app ios installation Error

after installing react-native frebase/app it works well for android , but in case of ios ...use of cd ios && pod install ..then pod is not installed ...follow the official documentation Altering CocoaPods to use frameworks
Beginning with firebase-ios-sdk v9+ (react-native-firebase v15+) you must tell CocoaPods to use frameworks.
Open the file ./ios/Podfile and add this line inside your targets:
use_frameworks!
To use Static Frameworks on iOS, you also need to manually enable this for the project with the following global to the top of your /ios/Podfile file:
$RNFirebaseAsStaticFramework = true...
is it same folder ./ios/podfile and /ios/podfile ?
then also not installed the pod and then use of
$RNFirebaseAsStaticFramework = true
use_modular_headers!
at the top of the pod file
and finally pod is installed but when build using npx react-native run-ios and then give a long error
Command CompileSwiftSources failed with a nonzero exit code
2022-07-05 16:47:46.163 xcodebuild[11109:198292] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-07-05 16:47:46.163 xcodebuild[11109:198292] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **
The following build commands failed:
CompileC /Users/arindam/Library/Developer/Xcode/DerivedData/DemoChat-cttmfseavejzhadnawolzvwrzelz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-jsi.build/Objects-normal/x86_64/JSIDynamic.o /Users/arindam/Documents/test_projects/DemoChat/node_modules/react-native/ReactCommon/jsi/jsi/JSIDynamic.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-jsi' from project 'Pods')
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'YogaKit' from project 'Pods')
(2 failures)
please help i am new to react native...how to solve the issue...
follow this.
xcode command line build failed with com.apple.compilers.llvm.clang.1_0.compiler
if above doesnt work, downgrade firebase version.
ie. package.json
"#react-native-firebase/app": "^12.9.0", // version 12 works great for me, but i get your error when i run version 15.

Why is Expo iOS build failing? ...something with ExpoModulesCore

Hey guys so I have an expo managed app and I want to use a notification library called Notifee which has an expo plugin. This plugin adds native code not supported by Expo Go, so I'm forced to enter bare workflow and build native iOS and Android folders.
I'm building the iOS package by running expo run:ios. And build fails due to something with ExpoModulesCore:
The following build commands failed:
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'ExpoModulesCore' from project
'Pods')
So I did some research and found that others had the same issue here on Stackoverflow. I tried altering the pod file and updating ExpoModulesCore
pod update ExpoModulesCore as this answer suggests
https://stackoverflow.com/a/71104305/8561357
After updating ExpoModulesCore and re-building, I get an additional error:
The following build commands failed:
PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/kevin/Library/Developer/Xcode/DerivedData/Addressbook-gmgtddiltntfosevknuexadcwkpt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-BC35D93E0A296DC41D8D893483CBC12F.sh (in target 'FBReactNativeSpec' from project 'Pods')
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'ExpoModulesCore' from project 'Pods')
(2 failures)
So why does this happen?
I saw something about Xcode version 13 not working, only 12??
Is Expo version incompatible?
Really trying to figure out what's going on here
maybe its was to late.
if you using react native 0.64.4, add or change expo-module-core version to ^0.6.5 on your package.json.
delete node_modules folder and yarn.lock (if you using yarn)
reinstall node_modules using yarn yarn install
sync node_modules with pod using pod deintegrate and then pod install on ios folder.
install expo modules using npx install-expo-modules from root project.
then build ios using yarn run ios
maybe you need to see similar issue on here:
http://bataxdev.com/blogs/detail/unable-to-find-a-spesification-for-expomodulescore

How to fix 'boost/operators.hpp' file not found' error in react-native

when I use 'react-native run-ios', there is some error, 'boost/operators.hpp' file not found.
I can not build and run my project:
react-native-cli: 2.0.1
react-native: 0.59.9
npm: 6.9.0
yarn: 1.16.0
node: v12.4.0
os: macos 10.14.5
xcode: 10.2.1
▸ Compiling JSIDynamic.cpp
❌ /Users/lidongbo/WorkBentch/ReactNative/AwesomeProject/node_modules/react-native/React/../third-party/folly-2018.10.22.00/folly/dynamic.h:63:10: 'boost/operators.hpp' file not found
#include <boost/operators.hpp>
^
▸ Analyzing JSCRuntime.cpp
▸ Analyzing jsi.cpp
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening AwesomeProject.xcodeproj
project can build and run.
If you get this issue in react-native-reanimated after upgrading to react-native 0.66 update your react-native-reanimated in package.json
Try "react-native-reanimated": "2.3.0-beta.2"
Don't forget to run yarn install or npm install to update your packages. Also do a pod install for ios and restart your server instance .
EDIT:
Support for react-native#0.66 has been officially added by react-native-reanimated#2.2.3 It is less buggy and a lot more issues have been solved.
Also check issue on github.
This might due to incomplete pods install - try deleting ios/Pods folder and run pod install under ios.
An alternative error for the same issue that I encountered was:
ios/Pods/boost-for-react-native/boost/operators.hpp:97:10: 'boost/config.hpp' file not found
To fix it, you need to clear cocoa pods and cache and re-install.
Delete cocoa pods cache: rm -r ~/Library/Caches/CocoaPods
Delete the Pods folder and the Podfile.lock usually located in <project_root>/ios.
Reinstall pods: pod update
You must delete cache from wherever ios concerns; Here's the process I do to clear its cache:
Delete npm cache: npm cache clean --force
Delete All ios temp files: cd ios && rm -r Pods/ Podfile.lock {yourProject}.xcworkspace
Clear Cocoapods Cache: rm -r ~/Library/Caches/CocoaPods
now install pods via npx: cd .. && npx pod-install
So I was also getting the error boost/operators.hpp file not found but my issue was from using :path instead of :podspec in my Podfile. I'm working on an integrated RN app inside of a Native iOS app, so I was manually adding the pods to the Podfile (something I will not do from now on).
pod 'boost', :path => ...
instead of
pod 'boost', :podspec => ...
It might not be the most common fix but hoping it helps someone.
I resolve the problem.
boost_1_63_0.tar.gz
double-conversion-1.1.6.tar.gz
folly-2018.10.22.00.tar.gz
glog-0.3.5.tar.gz
These files are not completely downloaded due to network reasons.
The file url is :
{your proejct}/node_modules/react-native/scripts/ios-install-third-party.sh at lowest line.
When I upgraded RN 0.64 -> 0.66, the following helped me:
Delete cocoa pods cache: rm -r ~/Library/Caches/CocoaPods
Delete the Pods folder and the Podfile.lock usually located in <project_root>/ios
Delete Pod folder in <project_root>/ios
yarn add react-native-reanimated#2.2.3
pod install

React-native -run-ios error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65

good time.
run ios error Failed
run code
react-native run-ios
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening reactapp.xcodeproj
** BUILD FAILED **
I've got the same error when run
$ react-native run-ios
My workaround steps:
open project by Xcode and choose the signature information as the attached image.
clear build folder: 'Your Project'/ios/build
re-run:
$ react-native run-ios
Hope this help.
That's because there is a new version of Flipper and React Native might not come with the right one so best is to go in your podfile and add this use_flipper!({ 'Flipper' => '0.74.0' }) then run pod install
If you don't have cocoa pods installed you need to by command sudo gem install cocoapods and run following commands from your project main directory
cd ios
pod install
cd ..
delete build folder from ios
react-native run-ios
if error persists, 1. delete build folder again 2. open the /ios folder in x-code 3. navigate File -> Project Settings -> Build System -> change (Shared workspace settings and Per-User workspace settings): Build System -> Legacy Build System
cd ios
rm -rf build/
cd ..
react-native run-ios