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
70
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
130
Continuous Integration in a monorepo
ruenzuo
0
510
!Introducing Swift in large code bases
ruenzuo
1
86
Scheduled Releases
ruenzuo
0
37
Other Decks in Programming
See All in Programming
torikago - Ruby::Boxで照らすモジュラモノリスの実行境界
se4weed
1
380
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
1k
the container ship “Apple Silicon”@WWDC26 Recap -Japan-\(region).swift
shingangan
0
130
Built Our Own Background Agent at LayerX
layerx
PRO
10
5.6k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
610
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
590
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
150
テーブルをDELETEした
yuzneri
0
140
バグを直したら useEffect が消えた
colorful12
2
490
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
390
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
300
引き算の組織 ― アウトカムとAIに全振りするために辞めたこと ― / Organization by Subtraction
hirokiyamamoto14
PRO
0
150
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
330
40k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.8k
エンジニアに許された特別な時間の終わり
watany
108
250k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.1k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
620
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
410
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
430
Statistics for Hackers
jakevdp
799
230k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
700
Design in an AI World
tapps
1
280
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.8k
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