17 December 2024 Leave a comment Tech-Help
Encountering the “error Failed to build iOS project. We ran ‘xcodebuild’ command but it exited with error code 65” can be frustrating, especially when your React Native project was working fine just moments before. This guide will help you troubleshoot and resolve this issue, ensuring you can continue developing your application without unnecessary interruptions.
Step-by-Step Solution
Follow these steps carefully to resolve the error:
-
Check CocoaPods Installation: Ensure CocoaPods is installed on your system. You can do this by running:
sudo gem install cocoapods
-
Install Pods: Navigate to the iOS directory of your project and install the necessary pods:
cd ios pod install
- Delete Build Folder: Remove the build folder inside the iOS directory to clear any old cache that might be causing conflicts.
- Switch to Legacy Build System: Open your project in Xcode. Navigate to File -> Project Settings -> Build System and switch both Shared workspace settings and Per-User workspace settings to “Legacy Build System.”
-
Run Your Project: Go back to your project root and run:
react-native run-ios
Additional Tips
- If the issue persists, consider updating your Xcode to the latest version from the official Apple website rather than the App Store.
- Ensure that your project’s folder names do not contain spaces or special characters, as these can sometimes cause path-related issues.
-
For users on Mac M1 architecture, ensure compatibility by installing relevant packages using:
sudo arch -x86_64 gem install ffi arch -x86_64 pod install
Leveraging Repeato for Seamless Testing
Once your project builds successfully, maintaining its functionality through consistent testing is crucial. This is where Repeato, our no-code test automation tool, can be invaluable. Repeato allows you to create, run, and maintain automated tests for your React Native apps swiftly and efficiently. Its integration with computer vision and AI ensures that your tests are robust and adaptable to changes, minimizing the risk of encountering build errors like the one discussed.
For more information on using Repeato for your testing needs, visit our documentation section. Explore how Repeato can streamline your testing processes and enhance your development workflow.