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
19
votes
2 answers

Xcode 11 recompiles too much

Xcode 11 is recompiling (nearly?) my whole project, even if I just change a local private variable, or change a value of a constant in local scope, sometimes even in local private function scope. I sometime can get 2 or 3 changes with quick builds…
Nikolay Suvandzhiev
  • 8,465
  • 6
  • 41
  • 47
19
votes
0 answers

Why does my Podspec throws multiple: "Execution policy exception registration failed and was skipped" notes?

Podspec is: Pod::Spec.new do |s| s.name = 'MyPod' s.version = '0.1.0' s.summary = 'my summary.' s.platform = :ios, '13.0' s.description = <<-DESC My description. …
Joseph Beuys' Mum
  • 2,395
  • 2
  • 24
  • 50
19
votes
7 answers

Github Actions: xcodebuild fails due to server fingerprint

I am trying to build a macOS app with Github Actions. This already worked very well, until I migrated my dependencies to Swift Package Manager. Now I am getting the following error while building my app: xcodebuild: error: Could not resolve package…
Yakuhzi
  • 969
  • 6
  • 20
19
votes
4 answers

Passing arguments to iOS tests with xcodebuild

I'd like to pass command line arguments to my iOS tests through the command line (xcodebuild). I'm looking for the equivalent of this setting on XCode: Simply passing the argument to xcodebuild doesn't work, e.g.: xcodebuild -verbose test…
lzm
  • 827
  • 2
  • 11
  • 25
19
votes
2 answers

No architectures to compile for (ARCHS=i386, VALID_ARCHS=arm64 armv7 armv7s)

Preface: I did look at similar questions and none of the answers seemed to fix my problem. I am trying to build my xcode (version 5.1.1) project using: xcodebuild clean build -sdk iphonesimulator7.0 -arch "armv7s" ONLY_ACTIVE_ARCH=NO, when I run…
heinst
  • 8,520
  • 7
  • 41
  • 77
18
votes
1 answer

Using info.plist for storing target-specific values for a multi-target app

I have a multi-target iPhone app which currently includes a header file with constant definitions that are conditionally included at build time depending on which target is being built. However, I was wondering if it might be better to instead…
andybee
  • 1,142
  • 3
  • 15
  • 26
18
votes
3 answers

Set xcode "build setting" from terminal?

Is there anyway that I can change a setting in xcode without opening xcode? I have an automated xcodebuild / xcrun process going on but I need to change 1 value: Targets > Select your target > Build Settings > Code Signing Resource Rules Path add…
nizzle
  • 1,036
  • 2
  • 10
  • 23
17
votes
4 answers

iOS 14, lipo error while creating library for both device and simulator

We have been using lipo command to create a framework which works on both device and simulator when integrated in other project. following are the build commands used to generate device and simulator builds xcodebuild -target SampleSDK…
Rajesh Rs
  • 1,301
  • 5
  • 24
  • 48
17
votes
1 answer

Xcode distributed build not working

Here is my test setting: 2 Computers (MacPro 8 cores, Mac mini 2 cores), same MacOSX version (10.6.5 10H574, i386), same Apple clang version 2.0, same Xcode version (Version 3.2.5) it simply wont get started. When I cleaned all targets on the mac…
Torsten B
  • 413
  • 2
  • 11
17
votes
3 answers

xcodebuild: "No applicable devices found." when exporting archive

As of Xcode 7†, the xcodebuild export archive step has been giving us errors. Build command xcodebuild -exportArchive -archivePath "path/to/Thing.xcarchive" \ -exportPath "path/to/" \ -exportOptionsPlist…
Clay Bridges
  • 11,602
  • 10
  • 68
  • 118
17
votes
2 answers

xcodebuild - setting build dir doesn't generate dSYM

I am doing an archive with xcodebuild (xcode 5) through the command line as so: xcodebuild -project MyProject.xcodeproj -scheme MyScheme -sdk iphoneos7.0 -configuration Release archive CODE_SIGN_IDENTITY="iPhone Distribution: My ID" -archivePath…
John S
  • 1,687
  • 6
  • 21
  • 28
17
votes
1 answer

Xcode5: Failed to register "/System/Library/CoreServices/CoreTypes.bundle/Contents/Library/MobileDevices.bundle

My library has some type converters. I'm registering some OSX and iOS type converters, like so: When I compile for iOS, I'm getting some errors related to not being able to find UIKit. Here's how I compile for iOS: xcodebuild -destination…
Jasper Blues
  • 28,258
  • 22
  • 102
  • 185
17
votes
9 answers

xcodebuild failure clang:error no such file or directory:

Having a problem when building with xcodebuild. My project/app builds fine with the Xcode - gui. It simply isn't finding/building the libcryptopp library which is part of the build process. The error is: clang: error: no such file or directory:…
Todd McGuinness
  • 269
  • 2
  • 5
  • 11
17
votes
6 answers

Xcode 4.5 Command Line Tools - xcode-select issue

After installing Xcode CLT 4.5.1 on OS X 10.8.2, I'm having issues installing native ruby gems which need to compiled. The output error is the same as with running xcrun -find: xcode-select: Error: No Xcode is selected. Use xcode-select -switch ,…
ddario
  • 1,015
  • 3
  • 12
  • 25
16
votes
2 answers

The connection to service named com.apple.fonts was invalidated on xcodebuild -resolvePackageDependencies

I am using fastlane to build my unity iphone application. It worked perfectly until all of a sudden i started getting the following error/warning during build: [10:13:48]: $ xcodebuild -resolvePackageDependencies -scheme Unity-iPhone -project…