Skip to main content

Questions tagged [xcodebuild]

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

xcodebuild
Filter by
Sorted by
Tagged with
496 votes
12 answers
219k views

"Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo." when using GCC

While attempting to compile my C program, running the following command: gcc pthread.c -o pthread Returns: Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via ...
coachcal's user avatar
  • 12.9k
205 votes
10 answers
59k views

"Too many symbol files" after successfully submitting my apps

I downloaded Xcode 6 GM and submitted two Swift apps to the app store today. Both passed all pre-upload verification and all the other stuff they had to pass and were successfully submitted. But ...
Jim Barber's user avatar
  • 2,139
162 votes
17 answers
130k views

How do I run a terminal command in a Swift script? (e.g. xcodebuild)

I want to replace my CI bash scripts with swift. I can't figure out how to invoke normal terminal command such as ls or xcodebuild #!/usr/bin/env xcrun swift import Foundation // Works println("...
Robert's user avatar
  • 38.1k
127 votes
11 answers
98k views

xcodebuild says does not contain scheme

I have a curios issue. I have a project that I've worked on and always built from the XCode IDE, and it worked fine. Now I'm setting up Bamboo to build the project and as such am building it from ...
Zac Tolley's user avatar
  • 2,340
124 votes
7 answers
109k views

How do I determine which iOS SDK I have?

I'm sure this is simple, but how do I determine which version of the iOS SDK I currently have installed?
Josh Brown's user avatar
  • 52.8k
101 votes
4 answers
55k views

How can I resolve "Error: No developer directory found at /Developer"?

I just upgraded XCode to 4.3.1. I'm using a script to build (and then deploy through Testflight) my app. But I now receive this error: Error: No developer directory found at /Developer. Run /usr/...
Giordano Scalzo's user avatar
83 votes
9 answers
69k views

Use xcodebuild (Xcode 8) and automatic signing in CI (Travis/Jenkins) environments

With the release of Xcode 8, Apple introduced a new way of managing the signing configuration. Now you have two options Manual and Automatic. According to the WWDC 2016 Session about Code signing (...
pablobart's user avatar
  • 2,651
82 votes
5 answers
97k views

How can I use the legacy build system with Xcode 10's `xcodebuild`?

I'd like to use the new build system of Xcode 10 for development, but our build in our continuous integration system fails since the xcarchive produced has an issue: the Info.plist in the xcarchive is ...
DarkDust's user avatar
  • 91.8k
80 votes
3 answers
54k views

Is the project.xcworkspace file important?

I am doing command line xcodebuild using a shell script. My problem is if I open and close the xx.xcodeproj file once and then use that command it works well. Somehow if I get deep into the file ...
thndrkiss's user avatar
  • 4,555
76 votes
2 answers
62k views

xcodebuild: simulator or device?

How do I specify to xcodebuild (the command line tool) whether I want to build for the simulator or device?
Steven Fisher's user avatar
68 votes
12 answers
35k views

How to filter the xcodebuild command line output?

Running xcodebuild from the console will bring you very verbose output and I wasn't able to locate any options for limit its output in order to display only warnings and errors. I'm looking for a way ...
sorin's user avatar
  • 167k
67 votes
4 answers
36k views

Which version of Xcode does xcodebuild use?

I have installed both Xcode 3.2 and Xcode 4.0.2 on the same machine, which uses Hudson for automated CI (continuous integration) builds. When I say that both were installed, what I mean by that is ...
kraftydevil's user avatar
  • 5,206
64 votes
12 answers
58k views

git error "unable to locate xcodebuild" after a fresh OS X Mavericks upgrade

When I try to run previously working git commands, I get this: dyld: Symbol not found: _sqlite3_intarray_bind Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData ...
tol4trob's user avatar
  • 1,187
63 votes
11 answers
51k views

The project named "Foo does not contain a scheme named "Bar" bitrise.io

I just configure a project in bitrise.io. But the xcode-build fails with error: xcodebuild: error: The project named "Foo" does not contain a scheme named "Bar". The "-list" option can be used to ...
Guilherme Torres Castro's user avatar
60 votes
13 answers
53k views

Running xcodebuild from a forked terminal

I'm trying to setup an automated build server for an iPhone application. I'd like to be able to have nightly adhoc beta builds so that testers can follow the development. I've setted up xcode ...
Yann Biancheri's user avatar
58 votes
13 answers
67k views

Xcode 10: unable to attach DB error

When updating to Xcode 10, iOS static library target fails to build. Way how I am trying to build it is following: xcodebuild -target TargetName -configuration Release clean build With Xcode 9 ...
uerceg's user avatar
  • 4,767
58 votes
7 answers
41k views

Can an Xcode .mobileprovision file be 'installed' from the command line?

I'm trying to automate the process of building apps for our clients using bash scripts running on a Mac Mini Server (OSX 10.7). My script is based on the spectacularly useful script from github ...
Ben Clayton's user avatar
  • 81.8k
57 votes
9 answers
22k views

Continuous Integration for Xcode projects?

After using Hudson for continuous integration with a prior project, I want to set up a continuous integration server for the iPhone projects I'm working on now. After doing some research it looks like ...
Mike Akers's user avatar
  • 12.1k
56 votes
7 answers
37k views

Choose a destination with a supported architecture in order to run on this device [closed]

my Xcode is Version 4.4.1 The project worked perfect before updating to this newer version, but now it stopped working
user1297301's user avatar
56 votes
7 answers
118k views

Xcode : Adding a project as a build dependency

Im playing around with the soundcloud api, in its instructions it says to drag SoundCloudAPI.xcodeproj into your project add it as a build dependency I can drag the project in pretty easily, but how ...
Aran Mulholland's user avatar
52 votes
2 answers
81k views

No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=armv7 armv7s)

Running in Xcode is correctly, but when I want to use command line with $ /usr/bin/xcodebuild -scheme projectA -workspace projectA.xcworkspace -configuration Debug clean build And come up with ...
Edward Chiang's user avatar
52 votes
5 answers
11k views

Terminal slow to start first time due to xcodebuild

The first time I run Terminal or start SmartGit either one is slow to start, taking up to ~30 seconds. When I look at the status bar for Terminal I see that it is stuck running some xcodebuild command....
Dhananjay Suresh's user avatar
50 votes
10 answers
43k views

xcodebuild -exportArchive: exportOptionsPlist error for key 'method': expected one of {}

I'm using command line xcodebuild tool to export ad-hoc distribution ipa file out of my archive like this: xcodebuild -exportArchive -archivePath /path/Archive.xcarchive -exportPath /path -...
Vlad Grigorov's user avatar
47 votes
6 answers
87k views

Setting a provisioning profile from within xcodebuild when making iPhone apps

I'm using xcodebuild to compile my iPhone app from the command line. Is there a way to pass in some sort of option to set the provisioning profile? There seems to be not very much information about ...
Steve Klabnik's user avatar
47 votes
5 answers
34k views

Xcode 4: Run tests from the command line (xcodebuild)?

I've created a brand new iOS project in Xcode 4, and included unit tests. The default app has 2 targets, the main application and the unit test bundle. Using "Product > Test" (Command-U) builds the ...
Steven Wisener's user avatar
44 votes
7 answers
32k views

How to display compiler output or custom build steps output when building with xcode?

How can I see the output from the compiler of from the custom build steps (pre-action or post-action)?
sorin's user avatar
  • 167k
43 votes
3 answers
11k views

Building with xcodebuild Timed out waiting for <IDEWorkspace, 0x2004cebc0>/"runContextManager.runContexts"

I am setting up my iphone project to run with hudson, my build script works fine locally, but when executing the following command on my snow leopard server mac xcodebuild -sdk iphoneos4.3 -workspace ...
Erik's user avatar
  • 5,831
41 votes
3 answers
41k views

Xcodebuild'ing a workspace and setting a custom build path

I'm trying to use xcodebuild to build a multi-project project in a workspace. When XCode builds a workspace it automatically places all build artifacts in a common directory in DerivedData so that ...
drekka's user avatar
  • 21.5k
38 votes
5 answers
33k views

iOS builds / ipa creation no longer works from the command line

Overview Our command line builds (to build and create the .ipa) are no longer working. iTunesConnect has started rejecting builds that use the CODE_SIGN_RESOURCE_RULES_PATH build setting. If we ...
Mike Vosseller's user avatar
38 votes
2 answers
47k views

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 -...
pqnet's user avatar
  • 6,450
38 votes
10 answers
47k views

Xcode 4 build succeeds, command line build fails?

I have a project in Xcode 4 (the latest non-beta version) that builds fine when built in Xcode itself. Specifically, the Ld command correctly uses the derived data directory (where build products, ...
James J's user avatar
  • 6,448
38 votes
5 answers
18k views

Timeout when running xcodebuild tests under Xcode 6 via SSH

I seem to be having issues with integrating Xcode6 with jenkins, I currently have this setup and working with Xcode 5. With xcode 6 running remotely via SSH the simulator time-out, when I run locally ...
StackRunner's user avatar
  • 1,503
38 votes
6 answers
30k views

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 - ...
Madhu's user avatar
  • 931
36 votes
4 answers
15k views

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 ...
Edward Huynh's user avatar
  • 2,917
35 votes
1 answer
47k views

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 ...
Rahul Iyer's user avatar
  • 20.6k
34 votes
5 answers
10k views

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. ...
Paul Shryock's user avatar
  • 1,389
34 votes
2 answers
45k views

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}...
clint's user avatar
  • 1,936
33 votes
2 answers
25k views

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's user avatar
32 votes
4 answers
23k views

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-...
Rey Gonzales's user avatar
32 votes
0 answers
4k views

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 ...
Cosmin's user avatar
  • 2,878
31 votes
3 answers
31k views

Flutter on iOS: redefinition of module 'Firebase'

I've been trying to build my flutter app on iOS but flutter run is throwing the following error: /Users/<MyUser>/Desktop/projects/app/ios/Pods/Firebase/CoreOnly/Source s/module.modulemap:1:8: ...
Wouter Pol's user avatar
  • 1,301
31 votes
16 answers
58k views

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' ...
quux's user avatar
  • 487
31 votes
4 answers
56k views

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 ...
Cy.'s user avatar
  • 2,135
30 votes
4 answers
44k views

How to accept Xcode license in a automation way?

In order to accept the Xcode License in CLI, we can run sudo xcodebuild -license Then the console will prompt You have not agreed to the Xcode license agreements. You must agree to both license ...
Quanlong's user avatar
  • 24.9k
29 votes
10 answers
35k views

How do I force Xcode to rebuild the Info.plist file in my project every time I build the project?

Apparently the file gets cached, so it only gets built when it gets changed. I have environment variables set to increment my version number though, and such, and update them independently of the ...
PTTHomps's user avatar
  • 1,499
29 votes
4 answers
14k views

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 ...
Alfie Hanssen's user avatar
29 votes
5 answers
22k views

ld: warning: ignoring duplicate libraries: '-lgcc' after the recent update of Xcodebuild tools

Recently, I upgraded to Xcode 15, and with that the update of the xcodebuild tools. However, suddenly, my standalone C++ applications are not able to use the g++-13 compiler for some reason? Anyone ...
Devansh Nigam's user avatar
29 votes
5 answers
28k views

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: <unknown&...
Adi B.'s user avatar
  • 369
28 votes
2 answers
13k views

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-...
emoleumassi's user avatar
  • 5,087
28 votes
2 answers
11k views

How can I build a Swift Package for iOS over command line?

In Xcode, I can select my destination as a "generic iOS device" or any iOS simulator, and my package will build platform-specific code for ios. Via command line "swift build" only builds my target ...
Michael's user avatar
  • 1,243

1
2 3 4 5
29