I ejected from expo to pure react native project. IOS project is not running as expected. The error i got was
~/ReactCommon/yoga/yoga/YGEnums.h: No such file or directory
More error is show below
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 TrackUs.xcodeproj
** BUILD FAILED ** The following build commands failed:
PBXCp /Users/user/ReactCommon/yoga/yoga/YGConfig.h /Users/user/Documents/Apps/App/ios/build/TrackUs/Build/Products/Debug-iphonesimulator/include/yoga/YGConfig.h
PBXCp /Users/user/ReactCommon/yoga/yoga/YGValue.h /Users/user/Documents/Apps/App/ios/build/TrackUs/Build/Products/Debug-iphonesimulator/include/yoga/YGValue.h
PBXCp /Users/user/ReactCommon/yoga/yoga/YGMarker.h /Users/user/Documents/Apps/App/ios/build/TrackUs/Build/Products/Debug-iphonesimulator/include/yoga/YGMarker.h
PBXCp /Users/user/ReactCommon/yoga/yoga/YGEnums.h /Users/user/Documents/Apps/App/ios/build/TrackUs/Build/Products/Debug-iphonesimulator/include/yoga/YGEnums.h (4 failures)
Is there anything I did wrong? It seem not to see the YOGA file or path.
Try deleting the build folder <your-project>/ios/build and then run react-native run-ios again.
Related
Environment
Mac OS X Version 12.1 (Apple M1 chip)
Xcode Version 13.2.1
Simulator Version 13.2 (972.2)
react-native-cli 7.0.3
node v18.4.0
The Issue
This is my first time working on developing an app using React Native. I am trying to run my React Native project on Xcode's simulator, using npx react-native run-ios. However, I am encountering this error message.
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 MCompass.xcworkspace.
Command line invocation:
/Users/brx/Downloads/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace MCompass.xcworkspace -configuration Debug -scheme MCompass -destination id=DC3C75E6-19FD-4B80-87B1-62BF6404ED20
...
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/brx/src/projects/test/MCompass/ios/build/MCompass.build/Debug-iphonesimulator/MCompass.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target 'MCompass' from project 'MCompass')
(1 failure)
Between the first error message and ** BUILD FAILED **, there were many lines of output listing exports.
I've installed dependencies using both yarn and npm. I've also looked at several other threads with this same issue, but none of the solutions (such as having only one version of nvm or running react-native upgrade) have been successful. Does anyone have any tips?
I had my root folder name "REACT NATIVE", changing it to "REACT_NATIVE" fixed the error as the folder that contains your react native project cannot contain white spaces.
The second solution would be running Xcode with rosetta. This is only applicable for M1 chip macbooks as there are few times Xcode projects fail because of this reason. Please refer to below link for reference:
https://penny-huang.medium.com/xcode-how-to-run-ios-simulator-on-m1-mac-66101b9fccd8
Hi I have the following error trying to debug an ios simulator with flutter. I used the flutter doctor command and also flutter doctor -v but it tells me there is no error. I also tried doing a flutter clean and then flutter run but the error persists. Has someone else happened to? Beforehand thank you very much!
lib/main.dart:1
Xcode build done. 36,1s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
Failed to package /Users/pedrocarrasco/Desktop/nuevo.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 12.
Exited (sigterm)
I am trying to run my little old project. I updating all the plugins and code issues are solved. but now if I run flutter run I get the bellow error
Xcode build done. 16.8s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/mdzainalabedin/padelmatchv2/ios/Runner/GeneratedPluginRegistrant.m:10
:9: fatal error: module 'connectivity' not found
#import connectivity;
~~~~~~~^~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 11.
After wasting so many times, I found only following command in terminal under Project directory folder is worked for me
rm ios/Podfile && flutter build ios
I'm developing an APP in React Native and I'm trying to run it in the IOS simulator. I've already tried in Android and the project run without problem, but when I try to run it on XCode Simulator trows the following error:
line 3: ../node_modules/react-native/scripts/react-native-xcode.sh: Permission denied
Command PhaseScriptExecution failed with a nonzero exit code
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 IDRUS_RSR.xcworkspace
* BUILD FAILED *
The following build commands failed:
PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/juanshallcrass/Documents/IDRUS/idrus-rsr/ios/build/IDRUS_RSR/Build/Intermediates.noindex/IDRUS_RSR.build/Debug-iphonesimulator/IDRUS_RSR.build/Script-00DD1BFF1BD5951E006B06BC.sh
(1 failure)
I've already tried changing the Bundle react Native code and images, to: ../node_modules/react-native/scripts/react-native-xcode.sh but nothing changed.
What can I do?
Looks like your project does not have the right permissions, try reinstalling the node_modules with your current user
The file ../node_modules/react-native/scripts/react-native-xcode.sh is currently throwing a Permission denied Exception
I have written a project with react-native and it works on Android. Now I want to run it on ios. When I build my project in Xcode it is okay and I have the "Build succeed" message. But when I run the project in my IDE I have the following Error:
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 MyProjectName.xcodeproj
** BUILD FAILED **
The following build commands failed:
myProjectDirectory/ios/build/MyProjectName/Build/Products/Debug-iphonesimulator/ReactNativeNavigationTests.xctest/ReactNativeNavigationTests normal x86_64
(1 failure)
....
I have tried bellow solutions, but none of them worked for me:
1- I removed the build folder from ios and rebuild the project again.
2- I ran "npm dedupe"
3- I built a simple new project and I could see "Welcome to React Native..." page on iphone.Then I installed wix v2 library in this project and I could see the page again. It means my problem is not about xcode version or wix installation steps.
4- I have clean and rebuild my project in xcode.
I searched a lot on the internet. But I couldn't find any helpful solution.
Any suggestion will be helpful.
It seems your tests are failing.
Try to run tests from Xcode and see if they are ok because my bet is they will fail.