iOS Quickstart Guide
Learn how to instantly drop LangCat into your native Apple applications using Swift Package Manager.
1. Extract your Configuration
From your LangCat project dashboard, download the LangCat-Info.plist metadata file. Drag this directly into your Xcode project hierarchy.
2. Install via Swift Package Manager
- In Xcode, click File > Add Package Dependencies...
- Search for
https://github.com/lang-cat/lang-cat-ios.git. - Import
LangCat(The runtime SDK).
3. Runtime Initialization
LangCat intercepts translation requests instantly using robust Objective-C runtime swizzling on NSLocalizedString calls. For safe rendering, you should strictly initialize the library before rendering views.
Asynchronous Loading (Recommended)
If your translations are mission critical and you wish to block initial renders via async/await:
import SwiftUIimport LangCat@mainstruct MyApp: App {@State private var isReady = falsevar body: some Scene {WindowGroup {if isReady {ContentView()} else {ProgressView("Updating Localizations...").task {// Awaits the LangCat edge fetch before continuing viewstry? await LangCat.initializeAsync()isReady = true}}}}}
Synchronous Loading
If you prefer a seamless splash-screen lifecycle backgrounding the sync natively:
import SwiftUIimport LangCat@mainstruct MyApp: App {init() {// Method Swizzle overrides happen synchronously. Network fetch runs silently.LangCat.initialize()}var body: some Scene {WindowGroup {ContentView()}}}
Moving Forward
Because LangCat perfectly swizzles Bundle, standard UIKit applications require no changes natively. However, SwiftUI processes LocalizedStringKey during compile-time. To fully utilize Over-The-Air localizations on SwiftUI apps, navigate to the LC Native Components reference guide!