Hi I have created a project using react-native and when I run the command
react-native run-ios
the build fails in the terminal with the following error:
**The following build commands failed:**
CompileC /var/root/Library/Developer/Xcode/DerivedData/albums-gnnqffkyfazehwcywcchxrdqkvpd/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-RCTText.build/Objects-normal/x86_64/RCTBaseTextInputView.o /ReactNative/albums/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Try this:
cd ios
pod install
react-native run-ios
You can run your react native IOS app using XCode by following below steps:
1.Go to your App folder, then go to ios folder. You'll see a file named AwesomeProject.xcworkspace.
2.Open this file and it will open your App in Xcode.
3.Select the desired simulator and click the ▶️ button to run your App.
Related
Hello I'm Beginner in React Native,
I've installed everything did they said.
Now I've created application using below command
react-native init TempApp
Application is created successfully
Now I try to run application using below command
npx react-native run-ios
I got below error
** BUILD FAILED **
The following build commands failed:
CompileSwift normal x86_64 /Users/encora/Documents/Paresh\ Workspace/React\ Native\ Projects/TempApp/ios/Pods/YogaKit/YogaKit/Source/YGLayoutExtensions.swift
CompileC /Users/encora/Library/Developer/Xcode/DerivedData/TempApp-fnxepatpnxxjncbfdflpymtfxxag/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/x86_64/SysUio.o /Users/encora/Documents/Paresh\ Workspace/React\ Native\ Projects/TempApp/ios/Pods/RCT-Folly/folly/portability/SysUio.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
Even I try to run application from Xcode also, but I still get error in Xcode also.
Can anyone help me please how to run first react application on Mac
Try this -
Close the Xcode,delete node_modules folder and then run commands in project directory
npm install / yarn install
cd ios && pod install --repo-update
npx react-native run-ios
Option 3 is optional either run project from terminal or from Xcode
Setting
os : Big Sur 11.1
homebrew : 2.7.1
node : 14.15.4
watchman : 4.9.0
Xcode : 12.3
cocoapods : 1.8.4
npx react-native init AwesomeProject
cd AwesomeProject
npx react-native start
cd AwesomeProject
npx react-native run-ios
result(err)
enter image description here
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.xcworkspace.
until npx react-native start there's no error
but npx react-native run-ios doesn't work.
I don't get what the problem is. Is Xcode version too high? please help
and how can I build AwesomeProject with Xcode app?. I tried but it failed too.
go to applications and right click on Xcode.app. select the get info. fill the check box of open using Rosseta.if yo want to run iOS with terminal do the steps for terminal.app as well.
enter image description hereI'm new to react native, I'm following the official React native's website to init a new project, try to run IOS. But, failed with the error below.
React-Native version 0.59
XCode 10.2
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 HelloWorld.xcodeproj
When I run react-native run-ios --simulator="iPhone 7"
Error as below:
info Command PhaseScriptExecution failed with a nonzero exit code
info
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 HelloWorld.xcodeproj
Starting the simulator : Once you have your React Native project initialized, you can run 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.
Specifying a device : You can specify the device the simulator should run with the --simulator flag, followed by the device name as a string. The default is "iPhone X". If you wish to run your app on an iPhone 4s, just run react-native run-ios --simulator="iPhone 4s".
The device names correspond to the list of devices available in Xcode. You can check your available devices by running xcrun simctllist devices from the console.
In my case, I was specifying a simulator, but I had a different simulator open. Targeting the one that was opened, or simply closing it fixed the issue.
try this and see if it works or not.
first go to to ios folder of the project in terminal.
for that you can use terminal in visual studio code.
cd ios then
pod install
go back (to app directory)
cd ..
npm install
npm start
take a new terminal then,
npx react-native run-ios
So this is a brand new Mac Air.. running Sierra.
When i run
ionic build ios
i get
** BUILD FAILED **
The following build commands failed:
CompileC /Users/foo/Library/Developer/Xcode/DerivedData/homepocket-gtpsstxtfgknjdgahozlqhgfgmmi/Build/Intermediates/homepocket.build/Debug-iphonesimulator/homepocket.build/Objects-normal/x86_64/AppDelegate.o homepocket/Classes/AppDelegate.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/foo/Library/Developer/Xcode/DerivedData/homepocket-gtpsstxtfgknjdgahozlqhgfgmmi/Build/Intermediates/homepocket.build/Debug-iphonesimulator/homepocket.build/Objects-normal/x86_64/MainViewController.o homepocket/Classes/MainViewController.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/foo/workspace/myproject_mobile/myproject/platforms/ios/cordova/build-debug.xcconfig,-workspace,myproject.xcworkspace,-scheme,myproject,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone 5s,build,CONFIGURATION_BUILD_DIR=/Users/foo/workspace/myproject_mobile/myproject/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/foo/workspace/myproject_mobile/myproject/platforms/ios/build/sharedpch
I installed latest xcode via apple store.
I set the machine to dev mode via xcode ide.
I've ran the emulate through xcode.
I can successfully 'ionic build android' as well as emulate.
I've also run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Because i was seeing
Error: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
.. mind you all of this is a fresh box from Apple.
After finding this.. https://forum.ionicframework.com/t/cordova-cdvviewcontroller-h-file-not-found-in-xcode-7-1-beta/32232/47
The solution for me was ...
ionic platform remove ios
ionic platform add ios#3.9.2
ionic prepare ios
Then i could build ios.
I am developing an app with phonegap and I have always been testing the app using the android simulator and I have not had any problems, but I can not get it to work for iOS.
I'm working on a Mac OS mavericks and have installed Xcode.
When I run the command "phonegap run ios", I get the following:
[phonegap] detecting iOS SDK environment...
[phonegap] using the local environment
[phonegap] compiling iOS...
Build settings from command line:
ARCHS = i386
CONFIGURATION_BUILD_DIR = /Users/usuario/Desktop/desarrolloapp/nombreapp/platforms/ios/build/emulator
SDKROOT = iphonesimulator7.1
VALID_ARCHS = i386
xcodebuild: error: The project ‘NombreApp.xcodeproj’ does not contain a target named ‘NombreApp’.
[error] /Users/usuario/Desktop/desarrolloapp/nombreapp/platforms/ios/cordova/build: Command failed with exit code 65
Any idea about what's going on?
EDIT: I solve this doing:
Remove ios folder from platforms.
Run again (phonegap run ios).
Install ios-sim with command sudo npm install -g ios-sim.
All worked fine!
A lot of thanks.
Best regards.
Manually create target with name NombreApp in Xcode as given this link :
->
How to create or define a new target in a custom Xcode project template
Regards,