Code organization strategies for complex globalization in Swift
summary
Argument: move all UI strings out of the monolithic app into a standalone Swift package and keep SwiftUI views in their own packages so previews load fast. Use code generation (SwiftGen) to produce typed accessors so missing keys fail compile time; add a Stencil extension to SwiftGen so SwiftUI previews actually localize. Proven on a 10‑layer demo and apps localized since 2011 across 16 languages with ~40M downloads; side tools mentioned: CombineSchedulers, Swingject, Quick/Nimble.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:08Where to store strings
- 3:40History of localization
- 7:39SwiftUI challenges
- 10:51Architecture matters
- 13:21Clean architecture layers
- 14:25Problems with string keys
- 15:50Code generation benefits
- 17:17SwiftUI double localization
- 19:04Fixing SwiftUI previews
- 20:09Final recommendations
- 21:15Controversial architecture tips
- 23:46Q&A session
related talks
34mMake Your SwiftUI Design System Portable with Swift Packages
17mMastering SwiftUI Previews: How the Project Structure can hel
46mPreviews and Package Oriented Programming
46mScaling Up With SwiftUI: Migrating iOS Apps To SwiftUI
23mUsing SwiftUI as a Language
41mWhen You Can’t Go All In On SwiftUI, Build a Hybrid UI App Instead!
33mScaling Swift Development
26mThe SwiftUI Mindset: 5 Key Ideas to Avoid Common Pitfalls
