Skip to main content

phrase/ios-sdk

phrase/ios-demo-app

The Phrase iOS SDK fetches OTA translation releases at runtime and caches them on-device. If the OTA service is unreachable, the SDK falls back to the last cached translations or to the strings bundled in your app binary. For more information on requirements and supported platforms, see the repository README.

Installation

For Carthage, run carthage update --use-xcframeworks after adding the entry. You can also download the latest release manually and link PhraseSDK.xcframework as a binary.

Setup

Call setup before any strings are displayed, typically in AppDelegate.application(_:didFinishLaunchingWithOptions:) or at the entry point of your SwiftUI app:
Both values are available in Phrase Strings after creating a distribution, or via the Distributions API.

Fetching and applying translations

applyPendingUpdates() makes the new strings visible immediately. If omitted, they take effect on the next cold launch.

Configuration options