New React-Native Project: Build fails (ios) - ios

I'm using:
react-native-cli: 2.0.1
react-native: 0.62.2
Xcode: 11.3.1
Creating a react-native project (react-native init GetAway) and starting it with
npx react-native run-ios throws an build error:
The following build commands failed:
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
CompileSwift normal x86_64 /Users/sercan/Desktop/Arbeit/Urlaub/rescue/GetAway/ios/Pods/YogaKit/YogaKit/Source/YGLayoutExtensions.swift
(2 failures)
I have no clue, why it comes to an build error, to a new created project.
If you have any ideas to solve this problem, please let me know.
Thanks in Advance
Edit: Link for full error message: https://docs.google.com/document/d/1o6tj9OrWmH-OZ5rCkYxhQTi-RYH36S5u36zpmBHHY3E/edit?usp=sharing

In my macOS system, this build error was resolved by restarting the computer. The issue has been reported at https://github.com/facebook/react-native/issues/28777, where I also found this workaround.

I resolved this by uninstalling the globally installed react-native-cli.
The react-native environment setup docs also state this.
React Native Environment Setup Docs
Screenshot from the environment setup docs

i fixed something similar by updating my xcode to 13 which requires that you update your macos to 11

Related

PhaseScriptExecution failed when trying to run React Native app

I am a newcomer when it comes to React Native. However, when I tried to follow the steps that React Native provided: Environment Setup (I chose to use React Native CLI, Mac and iOS). Everything went fine until I tried to run the command
npx react-native run-ios
This is the error log that I received in the Terminal:
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/phillip/Library/Developer/Xcode/DerivedData/myproject-csoqwegnbwhthjczvzcjwqasamef/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-46EB2E00018F30.sh (in target 'FBReactNativeSpec' from project 'Pods')
(1 failure)
I am using a MacBook Air with
M1 chip
MacOS Monterey
Xcode Version 14.2
node v19.6.0
Metro v0.73.7
I searched for a bunch of solutions, including the node versions, nvm, uninstalling build folder and use pod install, commenting post_install function inside Podfile file, but nothing works so far. I am using Node v19.6.0 and this is my which node output: /Users/username/.nvm/versions/node/v19.6.0/bin/node.
I also tried solutions from this reference: React Native - FBReactNativeSpec Command PhaseScriptExecution failed with a nonzero exit code but nothing has worked
Any help would be appreciated, thank you.

React Native run IOS build failure

I'm new to developing react native apps for iOS. I created a project using react-native init. I have managed to install all the requirements mentioned on that page. However, I ran into an issue while installing cocoa pods, but I installed it with home-brew. But now, I run into this build issue.
I have attached the issue which showed up in the terminal as well as the screenshot of the build error on Xcode. Any help would be appreciated. Thank you.
terminal build fail code
The following build commands failed:
CompileC /Users/ahyanawaz/Library/Developer/Xcode/DerivedData/Store-bekhqxqflgsqtyheijdxkrbwrksk/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-Core.build/Objects-normal/x86_64/RCTDatePickerManager.o /Users/ahyanawaz/Desktop/Store/node_modules/react-native/React/Views/RCTDatePickerManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Xcode build time error
img01
img02

react-native-webview commands failed to compile, how to fix?

someone has fixed or saw this issue?
I'm using last version of (react-native) and also macOS Catalina.
I did install react-native-webview by yarn and after into the (./ios) folder I had install the pods.
So build failed, after react-native run-ios.
The following build commands failed:
CompileC /Users/mymac/Library/Developer/Xcode/DerivedData/Project-cnketoyhxyitfqbbcdkdvhpuajey/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-webview.build/Objects-normal/x86_64/RNCWebView.o /Users/mymac/Desktop/React/project/node_modules/react-native-webview/apple/RNCWebView.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Are you running the latest version of Xcode?
See react-native-webview issue #1399

Couldn't install dependancy using carthage

I've been installing dependencies using pods, but now i've tried carthage first time.
I've opened an issue on git also, but looking for a quick help.
Here's the github link of issue:
https://github.com/Alamofire/Alamofire/issues/1765
Short Desc about Issue:
The following build commands failed:
CompileSwift normal x86_64
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(2 failures)
My Xcode version is 8.0,
git version 2.8.4 (Apple Git-73),
and carthage version 0.18.1: Redundant Redundancy
Any help would be highly appricaited
I had 3 versions of xcode installed 7, 8.0 and 8.1, I was trying on xcode 8 but I ended up using xcode 8.1 and changing the command line tool of xcode from preferences to xcode 8.1
hope this helps anyone else :)

Ionic build on iOS returns "BUILD FAILED"

I'm working on Ionic on a Mac machine. I have installed Google Analytics plugin and trying to build project but it is not working.
I am getting following error:
** **BUILD FAILED** **
The following build commands failed:
..../path normal i386
(1 failure)
>Error: Error code 65 for command: xcodebuild with args:
-xcconfig,/Volumes/Workspace/Dev/TestApp/platforms/ios/cordova/build-debug.xcconfig,
-project,TestApp.xcodeproj,
-target,TestApp,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,build,CONFIGURATION_BUILD_DIR=/Volumes/Workspace/Dev/TestApp/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Volumes/Workspace/Dev/TestApp/platforms/ios/build/sharedpch
I have tried with platform removing and add adding but still not got fixed.
How can I solve this issue?
It was an issue due to xcode compatibility of plugin. uninstalling current xcode and installing xcode 7.3.1 solved issue.
Note: It is due to ionic build ios command internally uses xcode command to build project.

Resources