Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Secret History: xcconfig files
Search
Renzo Crisóstomo
January 05, 2017
Programming
0
63
Secret History: xcconfig files
Slides from presentation given at CocoaHeads Hamburg January 2017 meet up.
Renzo Crisóstomo
January 05, 2017
Tweet
Share
More Decks by Renzo Crisóstomo
See All by Renzo Crisóstomo
Performance Testing using DTrace
ruenzuo
2
120
Continuous Integration in a monorepo
ruenzuo
0
490
!Introducing Swift in large code bases
ruenzuo
1
80
Scheduled Releases
ruenzuo
0
32
Other Decks in Programming
See All in Programming
CIを整備してメンテナンスを生成AIに任せる
hazumirr
0
420
TypeScriptでDXを上げろ! Hono編
yusukebe
4
920
[DevinMeetupTokyo2025] コード書かせないDevinの使い方
takumiyoshikawa
2
240
バイブコーディングの正体——AIエージェントはソフトウェア開発を変えるか?
stakaya
5
590
CLI ツールを Go ライブラリ として再実装する理由 / Why reimplement a CLI tool as a Go library
ktr_0731
3
910
テスターからテストエンジニアへ ~新米テストエンジニアが歩んだ9ヶ月振り返り~
non0113
2
250
抽象化という思考のツール - 理解と活用 - / Abstraction-as-a-Tool-for-Thinking
shin1x1
1
900
Advanced Micro Frontends: Multi Version/ Framework Scenarios
manfredsteyer
PRO
0
130
DynamoDBは怖くない!〜テーブル設計の勘所とテスト戦略〜
hyamazaki
0
150
React 使いじゃなくても知っておきたい教養としての React
oukayuka
18
5k
知って得する@cloudflare_vite-pluginのあれこれ
chimame
1
130
PHPUnitの限界をPlaywrightで補完するテストアプローチ
yuzneri
0
360
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.8k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
Code Review Best Practice
trishagee
69
19k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Balancing Empowerment & Direction
lara
1
520
GitHub's CSS Performance
jonrohan
1031
460k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Building an army of robots
kneath
306
45k
The Invisible Side of Design
smashingmag
301
51k
Embracing the Ebb and Flow
colly
86
4.8k
Done Done
chrislema
185
16k
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