Xcode Project: Build Failed

Xcode: Build Failed, but no error messages

Figured it out. On the tab with three lines in a speech bubble, it shows a build log. I guess my storyboard file had become corrupt during the last git pull.


For Xcode 12+
screenshot of Xcode 12 toolbar

Xcode project: Build Failed

Try this in terminal:

sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService

Xcode Project Build Failed With No Errors

The issue might occur because of Xcode.

(1) Quit and relaunch Xcode.

(2) Clean (⌘+shift+K) and build (⌘+shift+B) your project.

If that not case, check out he answer here by Kris i.e.

Click the last icon in the top bar of the left most panel in your
Xcode window to reveal the secret Archive build errors.

error Failed to build iOS project. We ran xcodebuild command but it exited with error code 65

If you don't have cocoa pods installed you need to sudo gem install cocoapods

  1. run cd ios
  2. run pod install
  3. cd ..
  4. delete build folder
  5. run react-native run-ios

if the error persists,

  1. delete build folder again
  2. open the /ios folder in x-code
  3. navigate File -> Project Settings -> Build System -> change (Shared workspace settings and Per-User workspace settings): Build System -> Legacy Build System`

You should be good to go.

Xcode 4: Build Failed, No Issues

On one of the local Cocoa Heads mailing lists I was encouraged to attempt a small default sample project - something I should have done in the beginning to make sure my provisioning and signing worked. It built and ran on my device without issue, so all signs point toward a problem with my code or the project.

I'll be throwing things from the existing project into the new sample project, and if it fails in a similar way I should be able to narrow the problem down to a smaller region of interest.


I've added the main functionality of the app into a new project, and it's running fine. The only things I did differently this time was I did not set up a universal binary (iPhone only right now) and turned off all but portrait orientation. As far as I can tell everything else is the same, though if I decide to look into it further later I will diff the project files and see what else might be different.

So the solution for me was to start a new project a port all the functionality from the old project into the new project.

It could be that recreating the target, as Paul suggests in another answer, would fix it as well, but with such a simple project restarting from scratch was easy for me.

Fastlane with XCode 14: ARCHIVE FAILED

XCode 14 strictly checks your project and distribution settings, "Development Team" and Bitcode for pods etc. from the one side, and maybe has some bugs from the other.

You should make next changes to avoid the issue:

  1. Remove Mac Catalyst from the destinations (if you don't use it) in your project:

General > Supported Destinations

Sample Image


  1. Disabling signing, bitcode and Mac Catalyst for all your pods in Podfile:
post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
flipper_post_install(installer)

# XCode 14 fix
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
config.build_settings['ENABLE_BITCODE'] = 'NO'

config.build_settings['SUPPORTED_PLATFORMS'] = 'iphoneos iphonesimulator'
config.build_settings['SUPPORTS_MACCATALYST'] = 'NO'
config.build_settings['SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD'] = 'NO'
end
end
end
end

  1. Update Fastlane to 2.210.1 because it has fix for deliver and pilot.

Project build failed in xcode

In your Xcode navigator, click on the Show the Log Navigator tab.

Sample Image

This tab will contain the build logs for each time your build/compile the application. When an error occurs, this will show you details. There is an expand button to check the details causing the error. Check the steps until it fails, see if anything fishy is happening during the build process. Usually in error cases the build process will freeze/quit at a particular source file.

Sample Image

Usually I have seen that restarting Xcode would clear its error cache and any stray errors will go away. Also as a quick check create a new sample app and try building it. If you get errors building this app as well, I'd suggest you reinstall the Xcode. If this builds properly, there is definitely issue with your project files/code. In that case you need to add more details in your question.



Related Topics



Leave a reply



Submit