running command "xcodebuild" exited with error code 65 - ios

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.

Related

Error When Start to Install React Native Project in IOS | Error Code 65

I got an error that said, it works before I update my OS to Monterey. but after I update it just like this.
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.
How can I solve this?
I try some references in Stackoverflow too, and I don't have a build folder in my project so it seems quite outdated some references in StackOverflow.

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 iOS build failed due to Yoga Error

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.

Carthage, Xcode 9. "xcodebuild timed out while trying to read *.xcodeproj" error

Today I downloaded xCode 9 and started converting everything to Swift 3.2/4, so I can build and run my project.
As it was expected carthage complaint about some project that they could not be build, as they were not compatible with Swift 3.2/4. I had to find the versions that were compatible and build them.
I also had to use --no-use-binaries, as some frameworks are precompiled with previous versions of Swift.
I then got the following error:
xcodebuild timeout while trying to read AWSiOSSDKv2.xcodeproj
So far I was probably not getting this error, as i was downloading AWS framework precompiled. Now that carthage had to compile it locally, something was missing and was creating the timeout.
To sort it out I did the following steps:
Open the timed out project in Xcode
Do not do anything
Run "Carthage build --platform iOS"
Everything compiled without any errors. It seams that once the project is opened in Xcode, Xcode is automatically adding something that is missing and the project compiles then.
This process has to be followed after every "carthage update", as the update will download a fresh xcode project.

Cordova command-line build fails in /tmp on Mac

I get a linker error building a brand-new PhoneGap app from the command line. It creates a bunch of files, and if I open the created .xcodeproj in Xcode, it builds just fine. So what's wrong with my command-line environment?
$ phonegap create /tmp/buildtest-ios
$ cd /tmp/buildtest-ios
$ phonegap -V build ios
[phonegap] detecting iOS SDK environment...
[phonegap] Checking iOS requirements...
[phonegap] using the local environment
[phonegap] compiling iOS...
[phonegap] Generating config.xml from defaults for platform "ios"
[phonegap] Compiling app on platform "ios" via command "/private/tmp/buildtest-ios/platforms/ios/cordova/build"
[error] An error occurred while building the ios project.** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
** BUILD FAILED **
The following build commands failed:
Ld /private/tmp/buildtest-ios/platforms/ios/build/emulator/HelloWorld.app/HelloWorld normal i386
(1 failure)
If I run the offending Ld command myself from the command line, I get "file not found". Does that mean the compiler failed and the linker error is just a red herring?
This is PhoneGap 3.3.0-0.18.0 on Mac OS X 10.9. I can create and build an Android app with this installation, no trouble. I get the exact same behavior if I use cordova directly. I've tried it on two Macs with the same symptom.
I finally discovered the answer using the cordova command-line tools. Cordova has a -d flag which is way more verbose than PhoneGap's -V flag. The linker was failing with a bunch of errors like
duplicate symbol _OBJC_METACLASS_$_CDVTimer in:
/private/tmp/buildtest-ios/platforms/ios/build/emulator/libCordova.a(CDVTimer.o)
/tmp/buildtest-ios/platforms/ios/build/emulator/libCordova.a(CDVTimer.o)
Note that /tmp on Mac is a symlink to /private/tmp, so these are pointing to the same file. No wonder they're duplicate symbols! So why is it trying to include the same file twice?
I tried creating a new test project in an empty folder /private/my-new-tmp2/buildtest-ios. Building it failed with the same error. So apparently something is weird with Cordova's iOS projects and the Ld linker in the /private directory on Mac OS X 10.9, and I'm the only person who's ever tried this. (As I said, building for Android works fine.)
In case someone else ever runs into the same problem, the solution is to build the project in /Users/me/some/directory rather than anywhere in /tmp or /private. Problem solved.
This may be because your framework references are corrupted or point to nowhere. In the left of XCode under 'Frameworks' and 'Resources' try re-adding anything you added yourself. Chances are with Cordova its a plugin SDK you are using that has been updated or deleted.
I had a similar issue while placing my project under /var/www/PROJECT on mac. I was getting the duplicate errors along with "../cordova/build: Command failed with exit code 65".
I was getting the duplicate errors because /var/www/ is also /private/var/www/
Solution was to move my project as described above to /Users/username/some-other-dir/...
I then ran phonegap run ios and all worked!

Resources