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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
4
3.5k
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
140
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5.2k
The Rails Doctrine Decade
koic
2
590
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.5k
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
350
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
180
気持ちぃ〜角丸 Squircle
ryu1013
0
310
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
390
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
残高管理から台帳サービスへの進化
artoy
1
200
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
Leo the Paperboy
mayatellez
10
2.4k
Documentation Writing (for coders)
carmenintech
77
5.6k
Music & Morning Musume
bryan
48
7.4k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
640
Prompt Engineering for Job Search
mfonobong
0
520
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
940
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
480
Git: the NoSQL Database
bkeepers
PRO
433
67k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
400
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