Configs/*.xcconfig files
Development.xconfig
PRODUCT_NAME = Dev
PRODUCT_BUNDLE_IDENTIFIER = me.steprescott.xcodegen-dev
Production.xconfig
PRODUCT_NAME = Production
PRODUCT_BUNDLE_IDENTIFIER = me.steprescott.xcodegen
Slide 45
Slide 45 text
Adding schemes
with XcodeGen
Slide 46
Slide 46 text
schemes:
Development:
build:
parallelizeBuild: true
targets:
XcodeGen: all
XcodeGenTests: testing
XcodeGenUITests: testing
run:
config: Development
test:
config: Development
targets:
- XcodeGenTests
- XcodeGenUITests
profile:
config: Development
analyze:
config: Development
archive:
config: Development
Slide 47
Slide 47 text
schemes:
Production:
build:
parallelizeBuild: true
targets:
XcodeGen: all
XcodeGenTests: testing
XcodeGenUITests: testing
run:
config: Production
test:
config: Production
targets:
- XcodeGenTests
- XcodeGenUITests
profile:
config: Production
analyze:
config: Production
archive:
config: Production
Slide 48
Slide 48 text
No content
Slide 49
Slide 49 text
Quick check
Do we have the same as before?
» A project
» Unit & UI test testing
» A linked dependency
» Configuration based on environments
Slide 50
Slide 50 text
Comparisons
Before After
Line count 1,915 575
Merge risk High None
Code review Noisy Focused
» 30% the size of the original project
» Settings / configurations more visible
Slide 51
Slide 51 text
Code review
comparison
Slide 52
Slide 52 text
No content
Slide 53
Slide 53 text
No content
Slide 54
Slide 54 text
Generating the .xcodeproj
Install XcodeGen with Homebrew
Run xcodegen via CLI or add Git hooks
Post-checkout & Post-merge
#!/bin/bash
export PATH=/usr/local/bin:$PATH
set -e
echo "
!
Running hook"
xcodegen
Slide 55
Slide 55 text
Step by step code examples
github.com/steprescott/XcodeGen