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
28
votes
5 answers

How to use xcodebuild with -only-testing and -skip-testing flag?

I've noticed that there are two options in xcodebuild's man page. -only-testing:TEST-IDENTIFIER constrains testing by specifying tests to include, and excluding other tests -skip-testing:TEST-IDENTIFIER constrains testing by…
Zigii Wong
  • 7,766
  • 8
  • 51
  • 79
28
votes
10 answers

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 plist (in the project build settings, actually). Is…
PTTHomps
  • 1,477
  • 2
  • 22
  • 38
28
votes
3 answers

XCode bundle identifier formatting from {PRODUCT_NAME}

Assume I have an iPhone application whose Product Name is "My App" (with a space between words) in XCode build settings. In my info.plist, the Bundle identifier is specified as com.mycompany.${PRODUCT_NAME:rfc1034identifier} In the resulting…
ravinsp
  • 4,150
  • 2
  • 32
  • 43
27
votes
2 answers

Provide xcodebuild with .mobileprovision file

I am setting up Jenkins for automating iOS builds. Are there any possibility to provide a .mobileprovision file that is not added to the provisioning tool in Xcode to xcodebuild? I know that I can use PROVISIONING_PROFILE and…
Fredrik Andersson
  • 3,567
  • 3
  • 19
  • 21
26
votes
3 answers

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//Desktop/projects/app/ios/Pods/Firebase/CoreOnly/Source s/module.modulemap:1:8: error: redefinition of module 'Firebase' module Firebase…
Wouter Pol
  • 1,031
  • 1
  • 8
  • 16
26
votes
2 answers

xcodebuild not copying file from .app

I've created a signed .xcarchive file using the xcodebuild command. Inside the .xcarchive is a .app file. Inside the .app is a file called archived-expanded-entitlements.xcent. This file is the key to my problem. I run a different xcodebuild command…
user1366911
  • 918
  • 7
  • 20
25
votes
2 answers

xcodebuild - how to define preprocessor macro?

How can I define a preprocessor macro when using xcodebuild? I need to build my app using a bunch of different configurations, and I would like to do this using a shell script which runs xcodebuild a number of times with different preprocessor…
Jaka Jančar
  • 11,386
  • 9
  • 53
  • 74
25
votes
1 answer

xcodebuild workspace and scheme

I am a little confused as to what happens with the xcodebuild command line tool when you specify a workspace and scheme. I understand how a configured scheme works in the XCode IDE GUI. The build action lists the targets to build and for each action…
Fergal Rooney
  • 1,330
  • 2
  • 18
  • 31
24
votes
3 answers

Archive with Xcode's command line build tool (xcodebuild archive)

The command line tool to build Xcode projects, xcodebuild, has a new build action available in Xcode 4: archive. From man xcodebuild: archive Archive a scheme from the build root (SYMROOT). This requires specifying a…
Steven Fisher
  • 44,462
  • 20
  • 138
  • 192
24
votes
1 answer

Xcode 7 PluginLoading: Required plug-in compatibility UUID

When I tried to build project from command line, I got the following message from xcodebuild: xcodebuild[10713:1209993] [MT] PluginLoading: Required plug-in compatibility UUID F41BD31E-2683-44B8-AE7F-5F09E919790E for plug-in at path…
David Liu
  • 16,374
  • 12
  • 37
  • 38
24
votes
3 answers

Accessing user defined variables passed in from xcodebuild command line

I am running my xctests using xcodebuild and need to pass in some environment variables. In the example below ACCOUNT_ID and HOST_URL. I tried passing in the variables as both environment variable and accessing them from the test using getenv…
wherewouldibe
  • 251
  • 1
  • 2
  • 5
23
votes
4 answers

When are profiles renewed when using "Automatically manage signing"/allowProvisioningUpdates?

I have an enterprise distributed app which is built on a build server using ​xcodebuild. Last year we made a change to use the "Automatically manage signing" feature with the "-allowProvisioningUpdates" flag. The provisioning profile is generated…
blork
  • 2,150
  • 6
  • 26
  • 45
23
votes
6 answers

xcode build fails with error code 65 without indicative message

I'm experiencing weird behaviour with my iPhone CI job (running in TeamCity). Every once in a while our build fails without any indicative error in the build log. The build reaches the last stage of codesign validation and I get ** BUILD FAILED **…
Nimrod Gutman
  • 1,027
  • 1
  • 10
  • 21
23
votes
1 answer

Conditionally build app with different asset catalogs

My Xcode project is setup in a way that has multiple configurations, allowing me to use the same code base for different variations of my app, but have unique elements in each such as app name, version, bundle identifier, icon, launch screen, etc.…
codeman
  • 8,868
  • 13
  • 50
  • 79
23
votes
2 answers

How to temporarily disable a Run Script phase in Xcode

I have a Run Script phase configured for my project's target. It is run on every build. Is it possible to temporarily disable this script without removing it from the target?
GregK
  • 1,653
  • 2
  • 15
  • 19