Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Secret History: xcconfig files
Search
Renzo Crisóstomo
January 05, 2017
Programming
76
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Secret History: xcconfig files
Slides from presentation given at CocoaHeads Hamburg January 2017 meet up.
Renzo Crisóstomo
January 05, 2017
More Decks by Renzo Crisóstomo
See All by Renzo Crisóstomo
Performance Testing using DTrace
ruenzuo
2
140
Continuous Integration in a monorepo
ruenzuo
0
510
!Introducing Swift in large code bases
ruenzuo
1
91
Scheduled Releases
ruenzuo
0
46
Other Decks in Programming
See All in Programming
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
2
360
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
220
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.1k
JIS keyboard support in Omarchy
lef237
0
120
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
170
The Rails Doctrine Decade
koic
2
590
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
3.8k
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
0
1.5k
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
Web Framework Benchmark Battle 2026, Any%
a_matsuda
2
2.3k
R8 の設定見直しでアプリサイズ削減
andpad
0
220
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
Navigating Weather and Climate Data
rabernat
0
560
Speed Design
sergeychernyshev
33
2.2k
Designing Experiences People Love
moore
143
24k
The Limits of Empathy - UXLibs8
cassininazir
2
720
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
630
Technical Leadership for Architectural Decision Making
baasie
3
600
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
430
Exploring anti-patterns in Rails
aemeredith
4
540
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
710
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
500
Transcript
SECRET HISTORY XCCONFIG FILES TONIGHT 8/7C XING
None
None
None
None
XCODE BUILD SYSTEM IS NOT IDEAL ! IMO !
BUT XCCONFIGS CAN HELP A LOT !
XCCONFIG > No actual documentation provided by Apple WRONG! >
Best docs provided by Samantha Marshall (holds true) > Supplemental file that replaces build settings in Xcode projects
None
None
WHAT CAN IT DO? > Override build settings > Inherit
values from existing settings: $(inherited) > Conditionally override > Import settings from other xcconfig files
OVERRIDING OTHER_LDFLAGS = -ObjC INHERIT OTHER_LDFLAGS = $(inherited) -framework Security
None
CONDITIONAL OVERRIDE > Conditions: sdk, arch, config, variant (?), dialect1
(?) GCC_PREPROCESSOR_DEFINITIONS[config=OmnitureTest] = $(inherited) OMNITURE_ENABLED=1 1 *: Google this one, you'll have a good !
INHERITANCE RULES 1. Platform defaults 2. Project file 3. xcconfig
file for the Project file 4. Target 5. xcconfig file for the target file
VALUE ASSIGNMENT RULES 1. Platform defaults 2. xcconfig file for
the Project file 3. Project file 4. xcconfig file for the target file 5. Target
VARIABLE SUBSTITUTION > String interpolation GCC_PREPROCESSOR_DEFINITIONS = $(inherited) CONFIGURATION_$(CONFIGURATION)=1 >
Resolved for Debug configuration as: GCC_PREPROCESSOR_DEFINITIONS = $(inherited) CONFIGURATION_Debug=1
PYCONFIG GET IT ON GITHUB: SAMDMARSHALL/PYCONFIG ALSO ⭐
SYNTAX export (path) !include (path) setting SETTING_NAME (inherits/use) { for/if
(condition) and (another condition) { (value) } }
EXAMPLE export "xing.xcconfig" !include "default.xcconfig" setting OTHER_LDFLAGS inherits { for
Debug { -lz, -framework "Reveal" } for Release }
RESULT #include "default.xcconfig" OTHER_LDFLAGS_Debug = $(inherited) -lz -framework "Reveal" OTHER_LDFLAGS_Release
= $(inherited) OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_$(CONFIGURATION))
USE: VARIABLE SUBSTITUTION setting PRODUCT_NAME use WRAPPER_EXTENSION { for app
{ "My App" } for xctest { "Unit Test Bundle" } for bundle { "Generic Bundle" } }
RESULT PRODUCT_NAME_app = "My App" PRODUCT_NAME_xctest = "Unit Test Bundle"
PRODUCT_NAME_bundle = "Generic Bundle" PRODUCT_NAME = $(PRODUCT_NAME_$(WRAPPER_EXTENSION))
IF: CONDITIONAL ASSIGNMENT setting PRODUCT_NAME { if arch=i386 { libIntel32
} if arch=x86_64 { libIntel64 } if arch=armv7 { libArm32 } if arch=arm64 { libArm64 } }
RESULT PRODUCT_NAME[arch=i386] = libIntel32 PRODUCT_NAME[arch=x86_64] = libIntel64 PRODUCT_NAME[arch=armv7] = libArm32
PRODUCT_NAME[arch=arm64] = libArm64
DEMO
ADVANTAGES > DSL is more readable that legacy plist format
> Less changes in xcodeproj file_size = targets * configuration
DISADVANTAGES > Restart Xcode to apply xcconfig changes (! dup.)
> Migration could be some effort xcodebuild -showBuildSettings
OTHER TOOLS > jcampbell05/xcake: DSL for Xcode projects > facebook/buck:
build system used at Facebook