Localization in Swift like a Pro

How to write safer localization code and save time by getting less distracted from your actual code writing task in Xcode.

The Status Quo in Xcode

Missing Feature #1: Keeping Localizations in Sync

Missing Feature #2: Resource Access

title = NSLocalizedString("onboarding.page-one.title", comment: "")
title = getString(R.string.onboarding_page_one_title)

Enhancing Xcode using Build Scripts

brew install bartycrouch swiftgen

BartyCrouch

Eliminate switching to Strings files entirely

Finding common Strings file issues

Configuring BartyCrouch

SwiftGen

Combine BartyCrouch & SwiftGen

Pro Localization Workflow

Conclusion