Slide 1

Slide 1 text

These are confidential sessions—please refrain from streaming, blogging, or taking pictures Session 404 Building from the Command Line with Xcode Anders Bertelrud Xcode Architect

Slide 2

Slide 2 text

Roadmap •Why use the command line?

Slide 3

Slide 3 text

Roadmap •Why use the command line? •Using xcodebuild

Slide 4

Slide 4 text

Roadmap •Why use the command line? •Using xcodebuild •Customizing your project

Slide 5

Slide 5 text

Roadmap •Why use the command line? •Using xcodebuild •Customizing your project •Automating xcodebuild

Slide 6

Slide 6 text

Roadmap •Why use the command line? •Using xcodebuild •Customizing your project •Automating xcodebuild •Working outside Xcode

Slide 7

Slide 7 text

Why Use the Command Line?

Slide 8

Slide 8 text

Why Use the Command Line?

Slide 9

Slide 9 text

Why Use the Command Line? •Automation ■ Nightly release builds ■ Continuous Integration systems

Slide 10

Slide 10 text

Why Use the Command Line? •Automation ■ Nightly release builds ■ Continuous Integration systems • Make-based open source development ■ Cross-platform code ■ MacPorts, Fink, Homebrew…

Slide 11

Slide 11 text

Using xcodebuild

Slide 12

Slide 12 text

What Is xcodebuild?

Slide 13

Slide 13 text

What Is xcodebuild? •Command line access to Xcode IDE

Slide 14

Slide 14 text

What Is xcodebuild? •Command line access to Xcode IDE •Works with projects and workspaces

Slide 15

Slide 15 text

What Is xcodebuild? •Command line access to Xcode IDE •Works with projects and workspaces •Batch operations ■ Build ■ Archive ■ Query

Slide 16

Slide 16 text

What Is xcodebuild? •Command line access to Xcode IDE •Works with projects and workspaces •Batch operations ■ Build ■ Archive ■ Query •Use man xcodebuild for the details

Slide 17

Slide 17 text

Using xcodebuild

Slide 18

Slide 18 text

Using xcodebuild >

Slide 19

Slide 19 text

Using xcodebuild > cd ~/Documents/MyProjectDir

Slide 20

Slide 20 text

Using xcodebuild > cd ~/Documents/MyProjectDir >

Slide 21

Slide 21 text

Using xcodebuild > cd ~/Documents/MyProjectDir xcodebuild >

Slide 22

Slide 22 text

Using xcodebuild > === BUILD NATIVE TARGET Baffle OSX OF PROJECT Baffle OSX WITH CONFIGURATION Debug === ProcessPCH build/Intermediates/PrecompiledHeaders/Baff leCocoa_Prefix-dkhujustkymhfqbdihrzilncxtxa/BaffleCoco a_Prefix.pch.pth OtherSources/BaffleCocoa_Prefix.pch n ormal x86_64 objective-c com.apple.compilers.llvm.clan g.1_0.compiler : cd ~/Documents/MyProjectDir xcodebuild >

Slide 23

Slide 23 text

Build Log Structure

Slide 24

Slide 24 text

Build Log Structure Target

Slide 25

Slide 25 text

Build Log Structure Target Command

Slide 26

Slide 26 text

Build Log Structure Target Command Message

Slide 27

Slide 27 text

=== BUILD NATIVE TARGET Baffle OSX OF PROJECT Baffle OSX CpResource ../SharedResources/BGShake.png build/Debug/Ba cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud CpResource ../SharedResources/BGCubeFace.png build/Debug cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud CpResource ../SharedResources/BGSwirl-Green.png build/De cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud CopyStringsFile build/Debug/Baffle\ OSX.app/Contents/Res cd /Users/anders/WWDC2012/Baffle builtin-copyStrings --validate --inputencoding utf-1 Build Logs in the Console

Slide 28

Slide 28 text

=== BUILD NATIVE TARGET Baffle OSX OF PROJECT Baffle OSX CpResource ../SharedResources/BGShake.png build/Debug/Ba cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud CpResource ../SharedResources/BGCubeFace.png build/Debug cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud CpResource ../SharedResources/BGSwirl-Green.png build/De cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud CopyStringsFile build/Debug/Baffle\ OSX.app/Contents/Res cd /Users/anders/WWDC2012/Baffle builtin-copyStrings --validate --inputencoding utf-1 Build Logs in the Console

Slide 29

Slide 29 text

=== BUILD NATIVE TARGET Baffle OSX OF PROJECT Baffle OSX CpResource ../SharedResources/BGShake.png build/Debug/Ba cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud CpResource ../SharedResources/BGCubeFace.png build/Debug cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud CpResource ../SharedResources/BGSwirl-Green.png build/De cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud CopyStringsFile build/Debug/Baffle\ OSX.app/Contents/Res cd /Users/anders/WWDC2012/Baffle builtin-copyStrings --validate --inputencoding utf-1 Build Logs in the Console

Slide 30

Slide 30 text

=== BUILD NATIVE TARGET Baffle OSX OF PROJECT Baffle OSX CpResource ../SharedResources/BGShake.png build/Debug/Ba cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud CpResource ../SharedResources/BGCubeFace.png build/Debug cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud CpResource ../SharedResources/BGSwirl-Green.png build/De cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud CopyStringsFile build/Debug/Baffle\ OSX.app/Contents/Res cd /Users/anders/WWDC2012/Baffle builtin-copyStrings --validate --inputencoding utf-1 Build Logs in the Console

Slide 31

Slide 31 text

CpResource ../SharedResources/BGShake.png build/Debug/Ba cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud CpResource ../SharedResources/BGCubeFace.png build/Debug cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud CpResource ../SharedResources/BGSwirl-Green.png build/De cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud CopyStringsFile build/Debug/Baffle\ OSX.app/Contents/Res cd /Users/anders/WWDC2012/Baffle builtin-copyStrings --validate --inputencoding utf-1 CompileXIB Resources/English.lproj/MainMenu.xib cd /Users/anders/WWDC2012/Baffle setenv XCODE_DEVELOPER_USR_PATH /Applications/Xcode. /Applications/Xcode.app/Contents/Developer/usr/bin/i CpResource ../SharedResources/Countdown.caf build/Debug cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud : ProcessPCH build/Intermediates/PrecompiledHeaders/Baffle cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi Build Logs in the Console

Slide 32

Slide 32 text

CpResource ../SharedResources/BGShake.png build/Debug/Ba cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud CpResource ../SharedResources/BGCubeFace.png build/Debug cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud CpResource ../SharedResources/BGSwirl-Green.png build/De cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud CopyStringsFile build/Debug/Baffle\ OSX.app/Contents/Res cd /Users/anders/WWDC2012/Baffle builtin-copyStrings --validate --inputencoding utf-1 CompileXIB Resources/English.lproj/MainMenu.xib cd /Users/anders/WWDC2012/Baffle setenv XCODE_DEVELOPER_USR_PATH /Applications/Xcode. /Applications/Xcode.app/Contents/Developer/usr/bin/i CpResource ../SharedResources/Countdown.caf build/Debug cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud : ProcessPCH build/Intermediates/PrecompiledHeaders/Baffle cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi Build Logs in the Console

Slide 33

Slide 33 text

CpResource ../SharedResources/BGShake.png build/Debug/Ba cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud CpResource ../SharedResources/BGCubeFace.png build/Debug cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud CpResource ../SharedResources/BGSwirl-Green.png build/De cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud CopyStringsFile build/Debug/Baffle\ OSX.app/Contents/Res cd /Users/anders/WWDC2012/Baffle builtin-copyStrings --validate --inputencoding utf-1 CompileXIB Resources/English.lproj/MainMenu.xib cd /Users/anders/WWDC2012/Baffle setenv XCODE_DEVELOPER_USR_PATH /Applications/Xcode. /Applications/Xcode.app/Contents/Developer/usr/bin/i CpResource ../SharedResources/Countdown.caf build/Debug cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud : ProcessPCH build/Intermediates/PrecompiledHeaders/Baffle cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi Build Logs in the Console

Slide 34

Slide 34 text

builtin-copyStrings --validate --inputencoding utf-1 CompileXIB Resources/English.lproj/MainMenu.xib cd /Users/anders/WWDC2012/Baffle setenv XCODE_DEVELOPER_USR_PATH /Applications/Xcode. /Applications/Xcode.app/Contents/Developer/usr/bin/i CpResource ../SharedResources/Countdown.caf build/Debug cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud : ProcessPCH build/Intermediates/PrecompiledHeaders/Baffle cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi CompileC ../SharedCode/BGBaffleWord.m normal x86_64 obje cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi CompileC ./OtherSources/main.m normal x86_64 objective-c cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi : Ld build/Debug/Baffle\ OSX.app/Contents/MacOS/Baffle\ OS Build Logs in the Console

Slide 35

Slide 35 text

builtin-copyStrings --validate --inputencoding utf-1 CompileXIB Resources/English.lproj/MainMenu.xib cd /Users/anders/WWDC2012/Baffle setenv XCODE_DEVELOPER_USR_PATH /Applications/Xcode. /Applications/Xcode.app/Contents/Developer/usr/bin/i CpResource ../SharedResources/Countdown.caf build/Debug cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud : ProcessPCH build/Intermediates/PrecompiledHeaders/Baffle cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi CompileC ../SharedCode/BGBaffleWord.m normal x86_64 obje cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi CompileC ./OtherSources/main.m normal x86_64 objective-c cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi : Ld build/Debug/Baffle\ OSX.app/Contents/MacOS/Baffle\ OS Build Logs in the Console

Slide 36

Slide 36 text

builtin-copyStrings --validate --inputencoding utf-1 CompileXIB Resources/English.lproj/MainMenu.xib cd /Users/anders/WWDC2012/Baffle setenv XCODE_DEVELOPER_USR_PATH /Applications/Xcode. /Applications/Xcode.app/Contents/Developer/usr/bin/i CpResource ../SharedResources/Countdown.caf build/Debug cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud : ProcessPCH build/Intermediates/PrecompiledHeaders/Baffle cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi CompileC ../SharedCode/BGBaffleWord.m normal x86_64 obje cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi CompileC ./OtherSources/main.m normal x86_64 objective-c cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi : Ld build/Debug/Baffle\ OSX.app/Contents/MacOS/Baffle\ OS Build Logs in the Console

Slide 37

Slide 37 text

builtin-copyStrings --validate --inputencoding utf-1 CompileXIB Resources/English.lproj/MainMenu.xib cd /Users/anders/WWDC2012/Baffle setenv XCODE_DEVELOPER_USR_PATH /Applications/Xcode. /Applications/Xcode.app/Contents/Developer/usr/bin/i CpResource ../SharedResources/Countdown.caf build/Debug cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud : ProcessPCH build/Intermediates/PrecompiledHeaders/Baffle cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi CompileC ../SharedCode/BGBaffleWord.m normal x86_64 obje cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi CompileC ./OtherSources/main.m normal x86_64 objective-c cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi : Ld build/Debug/Baffle\ OSX.app/Contents/MacOS/Baffle\ OS Build Logs in the Console

Slide 38

Slide 38 text

builtin-copyStrings --validate --inputencoding utf-1 CompileXIB Resources/English.lproj/MainMenu.xib cd /Users/anders/WWDC2012/Baffle setenv XCODE_DEVELOPER_USR_PATH /Applications/Xcode. /Applications/Xcode.app/Contents/Developer/usr/bin/i CpResource ../SharedResources/Countdown.caf build/Debug cd /Users/anders/WWDC2012/Baffle builtin-copy -exclude .DS_Store -exclude CVS -exclud : ProcessPCH build/Intermediates/PrecompiledHeaders/Baffle cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi CompileC ../SharedCode/BGBaffleWord.m normal x86_64 obje cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi CompileC ./OtherSources/main.m normal x86_64 objective-c cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi : Ld build/Debug/Baffle\ OSX.app/Contents/MacOS/Baffle\ OS Build Logs in the Console

Slide 39

Slide 39 text

clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi CompileC ../SharedCode/BGBaffleWord.m normal x86_64 obje cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi CompileC ./OtherSources/main.m normal x86_64 objective-c cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi : Ld build/Debug/Baffle\ OSX.app/Contents/MacOS/Baffle\ OS cd /Users/anders/WWDC2012/Baffle setenv MACOSX_DEPLOYMENT_TARGET 10.8 clang -arch x86_64 -fobjc-link-runtime -mmacosx-vers ** BUILD SUCCEEDED ** Build Logs in the Console

Slide 40

Slide 40 text

clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi CompileC ../SharedCode/BGBaffleWord.m normal x86_64 obje cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi CompileC ./OtherSources/main.m normal x86_64 objective-c cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi : Ld build/Debug/Baffle\ OSX.app/Contents/MacOS/Baffle\ OS cd /Users/anders/WWDC2012/Baffle setenv MACOSX_DEPLOYMENT_TARGET 10.8 clang -arch x86_64 -fobjc-link-runtime -mmacosx-vers ** BUILD SUCCEEDED ** Build Logs in the Console

Slide 41

Slide 41 text

clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi CompileC ../SharedCode/BGBaffleWord.m normal x86_64 obje cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi CompileC ./OtherSources/main.m normal x86_64 objective-c cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi : Ld build/Debug/Baffle\ OSX.app/Contents/MacOS/Baffle\ OS cd /Users/anders/WWDC2012/Baffle setenv MACOSX_DEPLOYMENT_TARGET 10.8 clang -arch x86_64 -fobjc-link-runtime -mmacosx-vers ** BUILD SUCCEEDED ** Build Logs in the Console

Slide 42

Slide 42 text

clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi CompileC ../SharedCode/BGBaffleWord.m normal x86_64 obje cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi CompileC ./OtherSources/main.m normal x86_64 objective-c cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi : Ld build/Debug/Baffle\ OSX.app/Contents/MacOS/Baffle\ OS cd /Users/anders/WWDC2012/Baffle setenv MACOSX_DEPLOYMENT_TARGET 10.8 clang -arch x86_64 -fobjc-link-runtime -mmacosx-vers ** BUILD SUCCEEDED ** Build Logs in the Console

Slide 43

Slide 43 text

clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi CompileC ../SharedCode/BGBaffleWord.m normal x86_64 obje cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi CompileC ./OtherSources/main.m normal x86_64 objective-c cd /Users/anders/WWDC2012/Baffle setenv LANG en_US.US-ASCII clang -x objective-c -arch x86_64 -std=c99 -O0 -Wswi : Ld build/Debug/Baffle\ OSX.app/Contents/MacOS/Baffle\ OS cd /Users/anders/WWDC2012/Baffle setenv MACOSX_DEPLOYMENT_TARGET 10.8 clang -arch x86_64 -fobjc-link-runtime -mmacosx-vers ** BUILD SUCCEEDED ** Build Logs in the Console

Slide 44

Slide 44 text

Build Logs in the IDE

Slide 45

Slide 45 text

Build Logs in the IDE

Slide 46

Slide 46 text

Build Logs in the IDE

Slide 47

Slide 47 text

Build Logs in the IDE

Slide 48

Slide 48 text

Build Logs in the IDE

Slide 49

Slide 49 text

Build Logs in the IDE

Slide 50

Slide 50 text

Build Logs in the IDE

Slide 51

Slide 51 text

Build Logs in the IDE

Slide 52

Slide 52 text

Build Logs in the IDE

Slide 53

Slide 53 text

Build Logs in the IDE

Slide 54

Slide 54 text

Build Logs in the IDE

Slide 55

Slide 55 text

Build Logs in the IDE

Slide 56

Slide 56 text

Build Logs in the IDE

Slide 57

Slide 57 text

Build Logs in the IDE

Slide 58

Slide 58 text

Build Logs in the IDE

Slide 59

Slide 59 text

Where Do the Outputs Go? Kind Contents Controlling Build Setting Intermediates Intermediates Intermediates Debug Products Debug Products Release Products Compiled Code (“Objects”) OBJROOT Generated Sources OBJROOT Precompiled Headers SHARED_PRECOMPS_DIR Products, in debug locations SYMROOT Debug Symbols (.dSYMs) SYMROOT Products, in release locations DSTROOT

Slide 60

Slide 60 text

Where Do the Outputs Go? Kind Contents Controlling Build Setting Intermediates Intermediates Intermediates Debug Products Debug Products Release Products Compiled Code (“Objects”) OBJROOT Generated Sources OBJROOT Precompiled Headers SHARED_PRECOMPS_DIR Products, in debug locations SYMROOT Debug Symbols (.dSYMs) SYMROOT Products, in release locations DSTROOT

Slide 61

Slide 61 text

Where Do the Outputs Go? Kind Contents Controlling Build Setting Intermediates Intermediates Intermediates Debug Products Debug Products Release Products Compiled Code (“Objects”) OBJROOT Generated Sources OBJROOT Precompiled Headers SHARED_PRECOMPS_DIR Products, in debug locations SYMROOT Debug Symbols (.dSYMs) SYMROOT Products, in release locations DSTROOT

Slide 62

Slide 62 text

Where Do the Outputs Go? Kind Contents Controlling Build Setting Intermediates Intermediates Intermediates Debug Products Debug Products Release Products Compiled Code (“Objects”) OBJROOT Generated Sources OBJROOT Precompiled Headers SHARED_PRECOMPS_DIR Products, in debug locations SYMROOT Debug Symbols (.dSYMs) SYMROOT Products, in release locations DSTROOT

Slide 63

Slide 63 text

Customizing Your Project

Slide 64

Slide 64 text

Controlling the Build •Schemes

Slide 65

Slide 65 text

Controlling the Build •Schemes •Overriding build settings

Slide 66

Slide 66 text

Controlling the Build •Schemes •Overriding build settings ■ Configuration files

Slide 67

Slide 67 text

Controlling the Build •Schemes •Overriding build settings ■ Configuration files ■ Architectures

Slide 68

Slide 68 text

Controlling the Build •Schemes •Overriding build settings ■ Configuration files ■ Architectures ■ SDKs

Slide 69

Slide 69 text

Controlling the Build •Schemes •Overriding build settings ■ Configuration files ■ Architectures ■ SDKs ■ Other build settings

Slide 70

Slide 70 text

Schemes •A scheme defines:

Slide 71

Slide 71 text

Schemes •A scheme defines: ■ A collection of targets to build

Slide 72

Slide 72 text

Schemes •A scheme defines: ■ A collection of targets to build ■ A configuration to use when building

Slide 73

Slide 73 text

Schemes •A scheme defines: ■ A collection of targets to build ■ A configuration to use when building ■ An optional collection of tests to execute

Slide 74

Slide 74 text

Schemes •A scheme defines: ■ A collection of targets to build ■ A configuration to use when building ■ An optional collection of tests to execute ■ User-defined pre- and post-processing actions

Slide 75

Slide 75 text

Listing the Schemes >

Slide 76

Slide 76 text

Listing the Schemes > xcodebuild -workspace Baffle.xcworkspace -list

Slide 77

Slide 77 text

Listing the Schemes > Information about workspace "Baffle": Schemes: Baffle OSX Baffle iOS xcodebuild -workspace Baffle.xcworkspace -list >

Slide 78

Slide 78 text

Listing the Schemes

Slide 79

Slide 79 text

Using Schemes •Configure in Xcode ■ Build configuration ■ Scheme actions ■ Other options

Slide 80

Slide 80 text

Using Schemes •Configure in Xcode ■ Build configuration ■ Scheme actions ■ Other options •Use in xcodebuild ■ Use -scheme flag to select scheme to use

Slide 81

Slide 81 text

Customizing Schemes

Slide 82

Slide 82 text

Customizing Schemes

Slide 83

Slide 83 text

Customizing Schemes

Slide 84

Slide 84 text

Specifying a Scheme >

Slide 85

Slide 85 text

Specifying a Scheme > xcodebuild -workspace Baffle -scheme "Baffle OSX"

Slide 86

Slide 86 text

Listing the SDKs >

Slide 87

Slide 87 text

Listing the SDKs > xcodebuild -showsdks

Slide 88

Slide 88 text

Listing the SDKs OS X SDKs: ! Mac OS X 10.7 -sdk macosx10.7 ! OS X 10.8 -sdk macosx10.8 iOS SDKs: ! iOS 6.0 -sdk iphoneos6.0 iOS Simulator SDKs: ! Simulator - iOS 6.0 -sdk iphonesimulator6.0 > xcodebuild -showsdks >

Slide 89

Slide 89 text

Specifying an SDK >

Slide 90

Slide 90 text

Specifying an SDK > xcodebuild -workspace Baffle -sdk macosx10.8

Slide 91

Slide 91 text

Build Settings

Slide 92

Slide 92 text

Build Settings •“Knobs and switches” of the build system

Slide 93

Slide 93 text

Build Settings •“Knobs and switches” of the build system •View and edit in Build Settings editor in IDE

Slide 94

Slide 94 text

Build Settings •“Knobs and switches” of the build system •View and edit in Build Settings editor in IDE •Override by passing on xcodebuild command line

Slide 95

Slide 95 text

Build Settings •“Knobs and switches” of the build system •View and edit in Build Settings editor in IDE •Override by passing on xcodebuild command line •Set in environment to provide defaults

Slide 96

Slide 96 text

Build Settings •“Knobs and switches” of the build system •View and edit in Build Settings editor in IDE •Override by passing on xcodebuild command line •Set in environment to provide defaults •Use -showBuildSettings option to xcodebuild

Slide 97

Slide 97 text

Seeing Values of Build Settings >

Slide 98

Slide 98 text

Seeing Values of Build Settings > xcodebuild -workspace Baffle -showBuildSettings

Slide 99

Slide 99 text

Seeing Values of Build Settings Build settings for action build & target "Baffle OSX" ACTION = build ALWAYS_SEARCH_USER_PATHS = NO APPLY_RULES_IN_COPY_FILES = NO ARCHS = i386 ARCHS_STANDARD_32_64_BIT = x86_64 i386 ARCHS_STANDARD_32_BIT = i386 ARCHS_STANDARD_64_BIT = x86_64 AVAILABLE_PLATFORMS = macosx iphoneos BUILD_DIR = ./build/Baffle/Build/Products CONFIGURATION = Debug COPYING_PRESERVES_HFS_DATA = NO : > xcodebuild -workspace Baffle -showBuildSettings

Slide 100

Slide 100 text

Overriding Build Settings >

Slide 101

Slide 101 text

Overriding Build Settings > xcodebuild -workspace Baffle OBJROOT=/tmp/objects

Slide 102

Slide 102 text

Overriding Build Settings > xcodebuild -workspace Baffle OBJROOT=/tmp/objects > or

Slide 103

Slide 103 text

Overriding Build Settings > xcodebuild -workspace Baffle OBJROOT=/tmp/objects > export OBJROOT=/tmp/objects or

Slide 104

Slide 104 text

Overriding Build Settings > xcodebuild -workspace Baffle OBJROOT=/tmp/objects > export OBJROOT=/tmp/objects > or

Slide 105

Slide 105 text

Overriding Build Settings > xcodebuild -workspace Baffle OBJROOT=/tmp/objects > export OBJROOT=/tmp/objects > xcodebuild -workspace Baffle or

Slide 106

Slide 106 text

What Build Settings Are Available? Xcode Build Setting Reference

Slide 107

Slide 107 text

What Build Settings Are Available? Xcode Build Setting Reference •Xcode built-in documentation

Slide 108

Slide 108 text

What Build Settings Are Available? Xcode Build Setting Reference •Xcode built-in documentation •Developer resources

Slide 109

Slide 109 text

Putting It All Together >

Slide 110

Slide 110 text

Putting It All Together > xcodebuild \

Slide 111

Slide 111 text

Putting It All Together > xcodebuild \ -workspace Baffle.xcworkspace \

Slide 112

Slide 112 text

Putting It All Together > xcodebuild \ -workspace Baffle.xcworkspace \ -scheme "Baffle OSX" \

Slide 113

Slide 113 text

Putting It All Together > xcodebuild \ -workspace Baffle.xcworkspace \ -scheme "Baffle OSX" \ -sdk macosx10.8 \

Slide 114

Slide 114 text

Putting It All Together > xcodebuild \ -workspace Baffle.xcworkspace \ -scheme "Baffle OSX" \ -sdk macosx10.8 \ OBJROOT=/tmp/objects \

Slide 115

Slide 115 text

Putting It All Together > xcodebuild \ -workspace Baffle.xcworkspace \ -scheme "Baffle OSX" \ -sdk macosx10.8 \ OBJROOT=/tmp/objects \ SYMROOT=/tmp/symbols \

Slide 116

Slide 116 text

Putting It All Together > xcodebuild \ -workspace Baffle.xcworkspace \ -scheme "Baffle OSX" \ -sdk macosx10.8 \ OBJROOT=/tmp/objects \ SYMROOT=/tmp/symbols \ DSTROOT=/tmp/distrib

Slide 117

Slide 117 text

Which Xcode.app? Xcode 4.3

Slide 118

Slide 118 text

Which Xcode.app? Xcode 4.3 Xcode 4.5 Preview

Slide 119

Slide 119 text

Which Xcode.app? Xcode 4.3 Xcode 4.5 Preview yacc lex ld cc

Slide 120

Slide 120 text

Which Xcode.app? Xcode 4.3 Xcode 4.5 Preview yacc lex ld cc yacc lex ld cc

Slide 121

Slide 121 text

Which Xcode.app? Xcode 4.3 Xcode 4.5 Preview yacc lex ld cc yacc lex ld cc ?

Slide 122

Slide 122 text

Use xcode-select >

Slide 123

Slide 123 text

Use xcode-select > xcode-select -print-path

Slide 124

Slide 124 text

Use xcode-select > /Applications/Xcode.app/Contents/Developer xcode-select -print-path >

Slide 125

Slide 125 text

Use xcode-select > /Applications/Xcode.app/Contents/Developer xcode-select -print-path xcode-select -switch /Applications/Xcode45-DP1.app >

Slide 126

Slide 126 text

Use xcode-select > /Applications/Xcode.app/Contents/Developer xcode-select -print-path xcode-select -switch /Applications/Xcode45-DP1.app > >

Slide 127

Slide 127 text

Use xcode-select > /Applications/Xcode.app/Contents/Developer xcode-select -print-path xcode-select -switch /Applications/Xcode45-DP1.app xcode-select -print-path > >

Slide 128

Slide 128 text

Use xcode-select > /Applications/Xcode.app/Contents/Developer xcode-select -print-path xcode-select -switch /Applications/Xcode45-DP1.app /Applications/Xcode45-DP1.app/Contents/Developer xcode-select -print-path > > >

Slide 129

Slide 129 text

Use xcode-select > /Applications/Xcode.app/Contents/Developer xcode-select -print-path xcode-select -switch /Applications/Xcode45-DP1.app /Applications/Xcode45-DP1.app/Contents/Developer xcode-select -print-path xcodebuild -version > > >

Slide 130

Slide 130 text

Use xcode-select > /Applications/Xcode.app/Contents/Developer xcode-select -print-path xcode-select -switch /Applications/Xcode45-DP1.app /Applications/Xcode45-DP1.app/Contents/Developer xcode-select -print-path xcodebuild -version Xcode 4.5 Build version 4G78z > > > >

Slide 131

Slide 131 text

What Is xcode-select Really Doing? •Sets the Xcode.app that’s used by tools in /usr/bin

Slide 132

Slide 132 text

What Is xcode-select Really Doing? •Sets the Xcode.app that’s used by tools in /usr/bin ■ xcodebuild

Slide 133

Slide 133 text

What Is xcode-select Really Doing? •Sets the Xcode.app that’s used by tools in /usr/bin ■ xcodebuild ■ xcrun

Slide 134

Slide 134 text

What Is xcode-select Really Doing? •Sets the Xcode.app that’s used by tools in /usr/bin ■ xcodebuild ■ xcrun ■ opendiff

Slide 135

Slide 135 text

What Is xcode-select Really Doing? •Sets the Xcode.app that’s used by tools in /usr/bin ■ xcodebuild ■ xcrun ■ opendiff ■ instruments

Slide 136

Slide 136 text

What Is xcode-select Really Doing? •Sets the Xcode.app that’s used by tools in /usr/bin ■ xcodebuild ■ xcrun ■ opendiff ■ instruments ■ ibtool

Slide 137

Slide 137 text

What Is xcode-select Really Doing? •Sets the Xcode.app that’s used by tools in /usr/bin ■ xcodebuild ■ xcrun ■ opendiff ■ instruments ■ ibtool ■ xed

Slide 138

Slide 138 text

What Is xcode-select Really Doing? •Sets the Xcode.app that’s used by tools in /usr/bin ■ xcodebuild ■ xcrun ■ opendiff ■ instruments ■ ibtool ■ xed ■ iprofiler

Slide 139

Slide 139 text

What Is xcode-select Really Doing? •Sets the Xcode.app that’s used by tools in /usr/bin ■ xcodebuild ■ xcrun ■ opendiff ■ instruments ■ ibtool ■ xed ■ iprofiler ■ agvtool

Slide 140

Slide 140 text

What Is xcode-select Really Doing? •Sets the Xcode.app that’s used by tools in /usr/bin ■ xcodebuild ■ xcrun ■ opendiff ■ instruments ■ ibtool ■ xed ■ iprofiler ■ agvtool

Slide 141

Slide 141 text

What Is xcrun?

Slide 142

Slide 142 text

What Is xcrun? •Find or run a tool inside Xcode.app

Slide 143

Slide 143 text

What Is xcrun? •Find or run a tool inside Xcode.app ■ Context-sensitive—depends on SDK, etc.

Slide 144

Slide 144 text

What Is xcrun? •Find or run a tool inside Xcode.app ■ Context-sensitive—depends on SDK, etc. ■ Also searches standard $PATH as a fallback

Slide 145

Slide 145 text

What Is xcrun? •Find or run a tool inside Xcode.app ■ Context-sensitive—depends on SDK, etc. ■ Also searches standard $PATH as a fallback •Mode 1: Print the path of the tool

Slide 146

Slide 146 text

What Is xcrun? •Find or run a tool inside Xcode.app ■ Context-sensitive—depends on SDK, etc. ■ Also searches standard $PATH as a fallback •Mode 1: Print the path of the tool ■ Usage: xcrun -find tool

Slide 147

Slide 147 text

What Is xcrun? •Find or run a tool inside Xcode.app ■ Context-sensitive—depends on SDK, etc. ■ Also searches standard $PATH as a fallback •Mode 1: Print the path of the tool ■ Usage: xcrun -find tool •Mode 2: Run the tool with a full command line

Slide 148

Slide 148 text

What Is xcrun? •Find or run a tool inside Xcode.app ■ Context-sensitive—depends on SDK, etc. ■ Also searches standard $PATH as a fallback •Mode 1: Print the path of the tool ■ Usage: xcrun -find tool •Mode 2: Run the tool with a full command line ■ Usage: xcrun tool arg1 arg2 ...

Slide 149

Slide 149 text

Using xcrun >

Slide 150

Slide 150 text

Using xcrun > xcrun -find cc

Slide 151

Slide 151 text

Using xcrun > /Applications/Xcode.app/Contents/Developer/Toolchains/ XcodeDefault.xctoolchain/usr/bin/cc xcrun -find cc >

Slide 152

Slide 152 text

Using xcrun > /Applications/Xcode.app/Contents/Developer/Toolchains/ XcodeDefault.xctoolchain/usr/bin/cc xcrun -find cc > xcrun cc -c source.c -o source.o

Slide 153

Slide 153 text

Using xcrun > /Applications/Xcode.app/Contents/Developer/Toolchains/ XcodeDefault.xctoolchain/usr/bin/cc xcrun -find cc > source.c:22:23: warning: unused parameter 'baz' int foo (int bar, int baz) ^ 1 warning generated. xcrun cc -c source.c -o source.o >

Slide 154

Slide 154 text

Using xcrun >

Slide 155

Slide 155 text

Using xcrun > xcrun -find git

Slide 156

Slide 156 text

Using xcrun > /Applications/Xcode45-DP1.app/Contents/Developer/ usr/bin/git xcrun -find git >

Slide 157

Slide 157 text

Using xcrun > /Applications/Xcode45-DP1.app/Contents/Developer/ usr/bin/git xcrun -find git > xcrun git --version

Slide 158

Slide 158 text

Using xcrun > /Applications/Xcode45-DP1.app/Contents/Developer/ usr/bin/git xcrun -find git > git version 1.7.9.6 (Apple Git-31) xcrun git --version >

Slide 159

Slide 159 text

Using xcrun > /Applications/Xcode45-DP1.app/Contents/Developer/ usr/bin/git xcrun -find git > git version 1.7.9.6 (Apple Git-31) xcrun git --version > alias git="xcrun git"

Slide 160

Slide 160 text

Using xcrun > /Applications/Xcode45-DP1.app/Contents/Developer/ usr/bin/git xcrun -find git > git version 1.7.9.6 (Apple Git-31) xcrun git --version > alias git="xcrun git" >

Slide 161

Slide 161 text

Using xcrun > /Applications/Xcode45-DP1.app/Contents/Developer/ usr/bin/git xcrun -find git > git version 1.7.9.6 (Apple Git-31) xcrun git --version > alias git="xcrun git" > git --version

Slide 162

Slide 162 text

Using xcrun > /Applications/Xcode45-DP1.app/Contents/Developer/ usr/bin/git xcrun -find git > git version 1.7.9.6 (Apple Git-31) xcrun git --version > alias git="xcrun git" > git --version git version 1.7.9.6 (Apple Git-31) >

Slide 163

Slide 163 text

Directly Invoking a Specific xcodebuild >

Slide 164

Slide 164 text

Directly Invoking a Specific xcodebuild > export DEVELOPER_DIR=/Applications/Xcode45-DP1.app/ Contents/Developer

Slide 165

Slide 165 text

Directly Invoking a Specific xcodebuild > export DEVELOPER_DIR=/Applications/Xcode45-DP1.app/ Contents/Developer >

Slide 166

Slide 166 text

Directly Invoking a Specific xcodebuild > export DEVELOPER_DIR=/Applications/Xcode45-DP1.app/ Contents/Developer > xcrun -find xcodebuild

Slide 167

Slide 167 text

Directly Invoking a Specific xcodebuild > export DEVELOPER_DIR=/Applications/Xcode45-DP1.app/ Contents/Developer > xcrun -find xcodebuild > /Applications/Xcode45-DP1.app/Contents/Developer/usr/ bin/xcodebuild

Slide 168

Slide 168 text

Directly Invoking a Specific xcodebuild > export DEVELOPER_DIR=/Applications/Xcode45-DP1.app/ Contents/Developer > xcrun -find xcodebuild > xcodebuild /Applications/Xcode45-DP1.app/Contents/Developer/usr/ bin/xcodebuild

Slide 169

Slide 169 text

Directly Invoking a Specific xcodebuild > export DEVELOPER_DIR=/Applications/Xcode45-DP1.app/ Contents/Developer > xcrun -find xcodebuild > xcodebuild /Applications/Xcode45-DP1.app/Contents/Developer/usr/ bin/xcodebuild === BUILD NATIVE TARGET Baffle OSX OF PROJECT Baffle OSX WITH CONFIGURATION Debug === ProcessPCH build/Intermediates/PrecompiledHeaders/Baff leCocoa_Prefix-dkhujustkymhfqbdihrzilncxtxa/BaffleCoco a_Prefix.pch.pth OtherSources/BaffleCocoa_Prefix.pch n ormal x86_64 objective-c com.apple.compilers.llvm.clan g.1_0.compiler

Slide 170

Slide 170 text

Using Xcode with Continuous Integration Automating xcodebuild Daniel Dunbar System Tools Engineer

Slide 171

Slide 171 text

What Is Continuous Integration? •Continuous Integration (CI) refers to a continuous process for integrating and applying quality checks to software development

Slide 172

Slide 172 text

What Is Continuous Integration? •Continuous Integration (CI) refers to a continuous process for integrating and applying quality checks to software development Commit

Slide 173

Slide 173 text

What Is Continuous Integration? •Continuous Integration (CI) refers to a continuous process for integrating and applying quality checks to software development Commit Build

Slide 174

Slide 174 text

What Is Continuous Integration? •Continuous Integration (CI) refers to a continuous process for integrating and applying quality checks to software development Commit Build Test

Slide 175

Slide 175 text

What Is Continuous Integration? •Continuous Integration (CI) refers to a continuous process for integrating and applying quality checks to software development Commit Build Test Publish

Slide 176

Slide 176 text

Continuous Integration Example

Slide 177

Slide 177 text

Continuous Integration Example •Common problem

Slide 178

Slide 178 text

Continuous Integration Example •Common problem ■ Develop with Xcode GM and Xcode WWDC Preview tools

Slide 179

Slide 179 text

Continuous Integration Example •Common problem ■ Develop with Xcode GM and Xcode WWDC Preview tools ■ Code shared between two products (e.g. OS X and iOS)

Slide 180

Slide 180 text

Continuous Integration Example •Common problem ■ Develop with Xcode GM and Xcode WWDC Preview tools ■ Code shared between two products (e.g. OS X and iOS) ■ Disruptive to switch between tools constantly

Slide 181

Slide 181 text

Continuous Integration Example •Common problem ■ Develop with Xcode GM and Xcode WWDC Preview tools ■ Code shared between two products (e.g. OS X and iOS) ■ Disruptive to switch between tools constantly •Solution

Slide 182

Slide 182 text

Continuous Integration Example •Common problem ■ Develop with Xcode GM and Xcode WWDC Preview tools ■ Code shared between two products (e.g. OS X and iOS) ■ Disruptive to switch between tools constantly •Solution ■ Use xcodebuild and Continuous Integration

Slide 183

Slide 183 text

Automating xcodebuild

Slide 184

Slide 184 text

Automating xcodebuild •Set DEVELOPER_DIR before running xcodebuild

Slide 185

Slide 185 text

Automating xcodebuild •Set DEVELOPER_DIR before running xcodebuild ■ This ensures the Xcode tools you want are used, regardless of the tools currently chosen by xcode-select

Slide 186

Slide 186 text

Automating xcodebuild •Set DEVELOPER_DIR before running xcodebuild ■ This ensures the Xcode tools you want are used, regardless of the tools currently chosen by xcode-select •Use appropriate options to set the workspace, scheme, SDK

Slide 187

Slide 187 text

Automating xcodebuild •Set DEVELOPER_DIR before running xcodebuild ■ This ensures the Xcode tools you want are used, regardless of the tools currently chosen by xcode-select •Use appropriate options to set the workspace, scheme, SDK •Use build settings to control where output files go

Slide 188

Slide 188 text

Automating xcodebuild •Set DEVELOPER_DIR before running xcodebuild ■ This ensures the Xcode tools you want are used, regardless of the tools currently chosen by xcode-select •Use appropriate options to set the workspace, scheme, SDK •Use build settings to control where output files go DSTROOT, OBJROOT, SYMROOT, SHARED_PRECOMPS_DIR

Slide 189

Slide 189 text

Automating xcodebuild

Slide 190

Slide 190 text

Automating xcodebuild •Make sure builds are run as a user who has accepted the license agreement; alternately, can accept for all users sudo xcodebuild -license

Slide 191

Slide 191 text

Automating xcodebuild •Make sure builds are run as a user who has accepted the license agreement; alternately, can accept for all users sudo xcodebuild -license •Ensure access to appropriate development certificates

Slide 192

Slide 192 text

Demo Automating project builds

Slide 193

Slide 193 text

Working Outside Xcode

Slide 194

Slide 194 text

Working Outside Xcode •Many projects may not supply native Xcode projects

Slide 195

Slide 195 text

Working Outside Xcode •Many projects may not supply native Xcode projects ■ Legacy code base

Slide 196

Slide 196 text

Working Outside Xcode •Many projects may not supply native Xcode projects ■ Legacy code base ■ Traditional UNIX development

Slide 197

Slide 197 text

Working Outside Xcode •Many projects may not supply native Xcode projects ■ Legacy code base ■ Traditional UNIX development ■ Cross-platform open source projects

Slide 198

Slide 198 text

Working Outside Xcode •Many projects may not supply native Xcode projects ■ Legacy code base ■ Traditional UNIX development ■ Cross-platform open source projects •Tools for working outside Xcode

Slide 199

Slide 199 text

Working Outside Xcode •Many projects may not supply native Xcode projects ■ Legacy code base ■ Traditional UNIX development ■ Cross-platform open source projects •Tools for working outside Xcode ■ Understanding the command line tools package

Slide 200

Slide 200 text

The Command Line Tools Package

Slide 201

Slide 201 text

The Command Line Tools Package •What is the command line tools package?

Slide 202

Slide 202 text

The Command Line Tools Package •What is the command line tools package? •How to install the command line tools package?

Slide 203

Slide 203 text

The Command Line Tools Package •What is the command line tools package? •How to install the command line tools package? •When should it be installed?

Slide 204

Slide 204 text

What Is the Package?

Slide 205

Slide 205 text

•New in Xcode 4.3 What Is the Package?

Slide 206

Slide 206 text

•New in Xcode 4.3 •Separate package for doing extensive command line development What Is the Package?

Slide 207

Slide 207 text

•New in Xcode 4.3 •Separate package for doing extensive command line development •Supported mechanism for UNIX-style development What Is the Package?

Slide 208

Slide 208 text

What Does It Contain?

Slide 209

Slide 209 text

What Does It Contain? •Contains everything for command line development

Slide 210

Slide 210 text

What Does It Contain? •Contains everything for command line development •Bundled at the standard UNIX location (/usr)

Slide 211

Slide 211 text

No content

Slide 212

Slide 212 text

No content

Slide 213

Slide 213 text

Tools OSX / SDK Documentation (man Pages)

Slide 214

Slide 214 text

Development Tools Debugging Tools Source Control Tools OSX / SDK Documentation (man Pages)

Slide 215

Slide 215 text

Obtaining the Command Line Tools Install from Xcode Download from Developer Resources

Slide 216

Slide 216 text

Developer Obtaining the Command Line Tools As a standalone download

Slide 217

Slide 217 text

Developer Obtaining the Command Line Tools As a standalone download

Slide 218

Slide 218 text

Developer Obtaining the Command Line Tools As a standalone download

Slide 219

Slide 219 text

Downloads for Apple Developers Developer Obtaining the Command Line Tools As a standalone download

Slide 220

Slide 220 text

Downloads for Apple Developers Developer Obtaining the Command Line Tools As a standalone download

Slide 221

Slide 221 text

Downloads for Apple Developers Developer Obtaining the Command Line Tools As a standalone download

Slide 222

Slide 222 text

Obtaining the Command Line Tools As part of Xcode

Slide 223

Slide 223 text

Obtaining the Command Line Tools As part of Xcode

Slide 224

Slide 224 text

Obtaining the Command Line Tools As part of Xcode

Slide 225

Slide 225 text

Obtaining the Command Line Tools As part of Xcode

Slide 226

Slide 226 text

Obtaining the Command Line Tools As part of Xcode

Slide 227

Slide 227 text

Obtaining the Command Line Tools As part of Xcode

Slide 228

Slide 228 text

When to Install the Package •Open source development

Slide 229

Slide 229 text

When to Install the Package •Open source development ■ Recommended practice for working with Fink, MacPorts, Homebrew

Slide 230

Slide 230 text

When to Install the Package •Open source development ■ Recommended practice for working with Fink, MacPorts, Homebrew $ fink install wget $ port install wget $ brew install wget

Slide 231

Slide 231 text

When to Install the Package •Open source development ■ Recommended practice for working with Fink, MacPorts, Homebrew Command Line Tools $ fink install wget $ port install wget $ brew install wget

Slide 232

Slide 232 text

When to Install the Package •Extensive command line usage

Slide 233

Slide 233 text

When to Install the Package •Extensive command line usage ■ Traditional UNIX-style workflow

Slide 234

Slide 234 text

When to Install the Package •Extensive command line usage ■ Traditional UNIX-style workflow ■ Legacy projects

Slide 235

Slide 235 text

When to Install the Package •Extensive command line usage ■ Traditional UNIX-style workflow ■ Legacy projects ■ Non-Xcode IDE based development (e.g., Makefiles)

Slide 236

Slide 236 text

When to Install the Package •Limited development, small download size

Slide 237

Slide 237 text

When to Install the Package •Limited development, small download size ■ Command line tools package is self-contained

Slide 238

Slide 238 text

When to Install the Package •Limited development, small download size ■ Command line tools package is self-contained ■ Does not contain Xcode IDE or other packages

Slide 239

Slide 239 text

When Not to Install the Package

Slide 240

Slide 240 text

When Not to Install the Package •Do not install just to get svn or git

Slide 241

Slide 241 text

When Not to Install the Package •Do not install just to get svn or git ■ Instead, use xcrun and shell aliases

Slide 242

Slide 242 text

When Not to Install the Package •Do not install just to get svn or git ■ Instead, use xcrun and shell aliases •Do not install unless you need them

Slide 243

Slide 243 text

When Not to Install the Package •Do not install just to get svn or git ■ Instead, use xcrun and shell aliases •Do not install unless you need them ■ Only one instance of command line tools

Slide 244

Slide 244 text

When Not to Install the Package •Do not install just to get svn or git ■ Instead, use xcrun and shell aliases •Do not install unless you need them ■ Only one instance of command line tools ■ Install is distinct from Xcode

Slide 245

Slide 245 text

When Not to Install the Package •Do not install just to get svn or git ■ Instead, use xcrun and shell aliases •Do not install unless you need them ■ Only one instance of command line tools ■ Install is distinct from Xcode ■ Requires manual effort to keep up-to-date with new releases

Slide 246

Slide 246 text

Review

Slide 247

Slide 247 text

Primary Xcode Command Line Tools Tool Summary xcode-select xcodebuild xcrun man Choose the default Xcode.app to use Build, archive, and query Xcode projects and workspaces Find and execute command line tools that are inside Xcode Access to command line documentation

Slide 248

Slide 248 text

Common xcode-select Options Option Usage -print-path -switch Show the currently selected Xcode Developer directory Switch to the given Xcode (or Developer directory)

Slide 249

Slide 249 text

Common xcodebuild Options Option Usage -workspace -project -scheme -sdk -showsdks -list -showBuildSettings NAME=VALUE Select a project or workspace to operate on Select a scheme to use Select an SDK to use List available SDKs List schemes or targets for active project or workspace List active build settings and their values Override a build setting with a particular value

Slide 250

Slide 250 text

Common xcrun Options Option Usage -find -sdk ... args ... Find a tool in the active Xcode Select an SDK to perform lookups in Find and execute the tool with the provided arguments

Slide 251

Slide 251 text

More Information Michael Jurewitz Developer Tools Evangelist [email protected] Documentation Xcode Build Setting Reference http://developer.apple.com man Pages http://developer.apple.com (or man on the command line) Apple Developer Forums http://devforums.apple.com

Slide 252

Slide 252 text

Related Sessions Working with Schemes and Projects in Xcode Marina Wednesday 4:30PM Building, Archiving, and Submitting Your App Pacific Heights Thursday 4:30PM

Slide 253

Slide 253 text

Labs Xcode Lab Developer Tools Lab B Daily 9:00AM Xcode Lab Developer Tools Lab B Daily 2:00PM

Slide 254

Slide 254 text

Summary

Slide 255

Slide 255 text

Summary •Xcode provides a number of tools for working on the command

Slide 256

Slide 256 text

Summary •Xcode provides a number of tools for working on the command •Use xcodebuild to script and automate builds

Slide 257

Slide 257 text

Summary •Xcode provides a number of tools for working on the command •Use xcodebuild to script and automate builds ■ Use build settings and schemes to customize to your project

Slide 258

Slide 258 text

Summary •Xcode provides a number of tools for working on the command •Use xcodebuild to script and automate builds ■ Use build settings and schemes to customize to your project •Consider using continuous integration to improve development

Slide 259

Slide 259 text

Summary •Xcode provides a number of tools for working on the command •Use xcodebuild to script and automate builds ■ Use build settings and schemes to customize to your project •Consider using continuous integration to improve development •Use the Command Line Tools package when working outside Xcode

Slide 260

Slide 260 text

No content

Slide 261

Slide 261 text

No content

Slide 262

Slide 262 text

No content

Slide 263

Slide 263 text

No content