Questions tagged [xcodebuild]

Questions related to the use of the command-line xcodebuild tool, which is part of Apple's Xcode toolset

builds one or more targets contained in an project, or builds a scheme contained in an Xcode workspace or Xcode project.

Usage

To build an Xcode project, run from the directory containing your project (i.e. the directory containing the projectname.xcodeproj package). If you have multiple projects in the this directory you will need to use -project to indicate which project should be built. By default, builds the first target listed in the project, with the default build configuration. The order of the targets is a property of the project and is the same for all users of the project.

See More

Building from the Command Line with Xcode FAQ

1388 questions
37
votes
2 answers

How can I build a specific architecture using xcodebuild?

I have legacy code that relies on pointers being 32-bit and want to use xCodeBuild to build that code from command line. This doesn't work for some reason. Here's the command I use: xcodebuild -configuration Debug -arch i386 -workspace…
pqnet
  • 6,070
  • 1
  • 30
  • 51
36
votes
4 answers

Xcode 4.5 command line unit testing

Having an issue since updating to Xcode 4.5 when running my unit tests via command line. The following is the output i'm seeing when i try to run my tests Unknown Device Type. Using UIUserInterfaceIdiomPad based on screen size Terminating since…
Edward Huynh
  • 2,907
  • 1
  • 27
  • 26
35
votes
5 answers

Xcode Build Error Jenkins: Your session has expired. Please log in

I'm trying to build my application using jenkins pipeline using shell command. Below is the command i'm using to build the app. sh 'xcodebuild -workspace projectname.xcworkspace - allowProvisioningUpdates -scheme projectname_UAT -sdk iphoneos -…
34
votes
1 answer

How to run / install xcodebuild?

If I try to run xcodebuild from the command line, I receive the message: error: can't exec '/Developer/usr/bin/xcodebuild' (No such file or directory) But, xcrun appears to work. Does this mean xcodebuild is not installed? I installed the command…
Rahul Iyer
  • 19,924
  • 21
  • 96
  • 190
33
votes
2 answers

When I "Build for archive" in Xcode 4, where does the file go?

When I "Build for archive" in Xcode 4, where does the file go? As in, where on my computer is the archived app saved? Thanks
Darren Findlay
  • 2,533
  • 2
  • 29
  • 46
33
votes
2 answers

Clean IOS xcode target in command line

I am building/running an IOS app from command line with following commands: xcodebuild -sdk "${TARGET_SDK}" -xcconfig "${CONFIG_FILE_PATH}" -configuration Release /usr/bin/xcrun -sdk "${TARGET_SDK}" PackageApplication -v…
clint
  • 1,786
  • 4
  • 34
  • 60
32
votes
5 answers

How do I stop iTerm2 from running xcodebuild and hanging when I open a window?

Since this morning, on my iMac (macOS High Sierra Version 10.13.6) any time I open an iTerm2 window (with Oh My Zsh installed), I see this: It seems that it's trying to run xcodebuild and it's stuck. I never get a prompt, even after waiting a long…
Paul Shryock
  • 1,309
  • 11
  • 17
32
votes
4 answers

xcodebuild different provisioning profile for target dependency

I'm trying to build my app with xcodebuild: xcodebuild -workspace "RG.xcworkspace" -scheme "Production" -configuration "Release" build CONFIGURATION_BUILD_DIR="${TEMP_DIR}" PROVISIONING_PROFILE="1234-5678-9098-7654-3210" My scheme has two targets.…
Rey Gonzales
  • 836
  • 1
  • 8
  • 17
31
votes
4 answers

How to solve "Application failed codesign verification" when uploading to iTunes Connect?

I've got a problem that I couldn't solve with a deep search in different resources as most of the "similar" points out to be an error with Icon.png size, etc... I've tried to upload my application after verifying that: Correctly builds and run on…
Cy.
  • 2,125
  • 4
  • 26
  • 35
31
votes
16 answers

Code sign error with Xcode 3.2

I had a fully working build environment before upgrading to iPhone OS 3.1 and Xcode 3.2. Now when I try to do a build, I get the following: Code Sign error: Provisioning profile 'FooApp test' specifies the Application Identifier…
quux
  • 487
  • 1
  • 4
  • 9
29
votes
0 answers

Add Xcode Developer Account from the Command Line

I am trying to use xcodebuild -allowProvisioningUpdates on a machine that I only have access via the command line (Azure Devops macOS Hosted Machine). Unfortunately, according to man xcodebuild in order to use -allowProvisioningUpdates it seems that…
Cosmin
  • 2,840
  • 5
  • 32
  • 50
29
votes
5 answers

Xcode 10 archiving fails - only on command line (xcodebuild)

I'm having issues with archiving on my CI machine (Jenkins), when running the process manually on the SAME machine but with the Xcode UI, everything works just fine. The error I get is: :0: error: cannot have input files with file list **…
Adi B.
  • 369
  • 1
  • 3
  • 10
29
votes
4 answers

How to detect that a provisioning profile is for development or distribution, programmatically

I would like to detect if a given provisioning profile is a development profile or a distribution (adhoc or app store) profile. I need to do this purely programmatically. I already understand how to detect adhoc vs appstore. And am specifically…
Alfie Hanssen
  • 16,964
  • 12
  • 68
  • 74
28
votes
7 answers

Cannot build XCode project from command line but can from XCode

I've created in XCode a simple navigation-based iPhone app. The app builds and runs properly from under XCode but I cannot get it to build from command line. From terminal I execute: xcodebuild -project George.xcodeproj -alltargets…
mgamer
  • 13,580
  • 25
  • 87
  • 145
28
votes
2 answers

How can i fix this warning: CoreSimulator is attempting to unload a stale CoreSimulatorService job

I have a warning in my build log in teamcity. I've updated Xcode on my CI-Server from 7.3.1 to 8. The step run successfully but I have this: [Step 3/3] Starting: /Users/teamcity/local/teamcity-build-agent/temp/agentTmp/custom_scriptxxxxxxx [Step…
emoleumassi
  • 4,881
  • 13
  • 67
  • 93
1 2
3
92 93