5.1.0-beta
Pre-release
Pre-release
BETA Release - What’s New
Public Function: applyPendingUpdates
The new function applyPendingUpdates
makes newly downloaded translations available immediately—without needing to restart the app.
ℹ️ Note: If
applyPendingUpdates
is not called, the new translations will still be applied automatically on the next app launch.
Example:
Task {
do {
let newUpdatesAvailable = try await Phrase.shared.updateTranslation()
if newUpdatesAvailable {
Phrase.shared.applyPendingUpdates()
// refresh the screen if needed
...
}
} catch {
// Error handling
}
}
Note: Build with Xcode 16.2 & Swift 6.0