Error: /usr/bin/xcodebuild Failed With Return Code: 65 [Fix]

Make sure that the address code signing and certificate are valid

Reading time icon 4 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more

How to fix Error usr/bin/xcodebuild failed with Return Code 65

Many developers encountered ## error error /usr/bin/xcodebuild failed with return code 65, and in today’s guide, we’re going to show you few methods you can use to fix this error.

What is error code 65 in Xcode build?

This error is usually caused by address code signing issues, your project settings or problems with dependencies.

How do I fix error: /usr/bin/xcodebuild failed with return code: 65?

1. Fixing the address code signing issues

  1. Verify if your Apple Developer Program membership is active, then go to Project Settings and double-check your signing certificate for your project.
  2. In Project Settings, also make sure that the provisioning profile is the same as the one from Apple Developer Account. You may also refresh the provisioning profile in Xcode to make sure.
  3. If the Error /usr/bin/xcodebuild failed with return code 65 is still present, revoke your signing certificate and create a new one.

The address code signing is the main problem when getting the return code 65 in Xcodebuild so make sure that everything is alright with the membership and signing certificate.

2. Fixing incorrect project settings

  1. Go to the General tab in the Project Settings of your project, then locate Bundle Identifier and see if it matches the one in your Apple Developer Account.
  2. On the same General tab, check the Deployment Target. That is the lowest iOS version your app supports, and it must not be higher than the one on your simulator.
  3. Check all the options in the Project Settings and verify if you have the same in the Apple Developer Account.
  4. After you have made all the changes, clean and rebuild your project in Xcodebuild.

After doing that, check if ## error error the process ‘/usr/bin/xcodebuild’ failed with exit code 65 is gone.

3. Running tests individually and debugging

  1. Run the tests individually, it should help you pinpoint the problem.
  2. Next, use the debugger to find the cause of the issue.
  3. You might have to repeat these steps several times to pinpoint the cause of the problem.

4. Cleaning the Build folder and checking for errors

  1. In Xcode, go to the Product menu and select Clean Build Folder to delete all the files from your previous builds.
  2. Now, go to Product again and select Build to create a clean build.
  3. Check if the error persists.

5. Uninstall and reinstall Xcode

  1. Go to the Applications folder.
  2. Locate Xcode and move it to the Trash bin.
  3. Empty the Trash bin.
  4. Next, run the installer again or download it from Apple Developer Xcode page.

6. Resetting the iOS Simulator

  1. Go to Xcode, select Open Developer Tool, and choose Simulator.
  2. Click on Device and select Erase All Content and Settings.
  3. Once you reset the Simulator to default settings, rebuild your project and see if you still get the error.

7. Fixing the Libraries and Dependencies

  1. Check if the dependencies are compatible with both Xcode and the iOS version you’re developing for.
  2. If necessary, check and update the dependencies configuration.
  3. Lastly, rebuild your project.

Tips on how to avoid the /usr/bin/xcodebuild failed with return code 65 error

  1. Keep your Xcode updated to avoid any bugs or lack of functionality.
  2. Clean your build regularly to remove the clutter that can cause issues with your code.
  3. Use Git to control any changes in your code and revert the build whenever problems occur.
  4. Review your dependencies and test your build as often as possible.

## error error /usr/bin/xcodebuild failed with return code 65 can be tricky to fix, since it’s a developer error, but hopefully, this guide managed to help you.

If you’re an advanced coder, you might also want to install the Xcode command line tools.

You may also be interested in the best cross-platform code editors that might offer additional help.

For any other suggestions on how to fix this error, feel free to use the comments section below and let us know.

More about the topics: iOS, mac os

User forum

0 messages