QuickVerse makes mobile & web app localization a breeze. Migrate your web and mobile localizations to QuickVerse Cloud, and start managing them anytime, anywhere, collaboratively.
- Select File » Add Packages... and enter the repository URL of the package https://github.com/QuickVerse/quickverse-ios-sdk.git into the search bar (top right).
- Set the Dependency Rule to Up to next major, and the version number to 1.0.0 < 2.0.0.
- Ensure "QuickVerse" when a prompt for "Choose Package Products for quickverse-ios-sdk" appears. Finally, choose the target where you want to use it.
The library should have been added to the Swift Package Dependencies section, and you'll now be able to import it in the files where you need it.
- Add the following to your Podfile. If you don't already have a Podfile, run
pod init
in your project's root directory:
pod 'QuickVerse' // Always use the latest version
pod 'QuickVerse', '~> 1.4.6' // Or pin to a specific version
- In a terminal window, navigate to the directory of your
Podfile
, and runpod install --repo-update
We recommend integrating with SPM or CocoaPods, but please contact us for integration guidance if you wish to use Carthage.
QuickVerse is a very lightweight integration, requiring just a few lines of code.
import QuickVerse
You'll need your APIKey, retrievable from your QuickVerse account here.
- For UIKit, place in
didFinishLaunchingWithOptions
in AppDelegate.swift - For SwiftUI, we recommend placing in the initialiser for your app, as shown here
QuickVerse.configure(apiKey: "{your-api-key}")
QuickVerse.isDebugEnabled = true // Optionally get detailed console logs
In most cases, you'll want to download the localizations during your launch sequence - before any copy is shown to the user.
QuickVerse.getLocalizations { [weak self] success in
// Continue into app or handle failure
}
Note: Keep an eye on the console. If you enable isDebugEnabled
, the QuickVerse SDK will print out all available keys from your quickverse.io account.
yourlabel.text = QuickVerse.stringFor(key: "Onboarding_Demo_Title")
Optionally provide a default value, should the key not exist in the local store.
yourlabel.text = QuickVerse.stringFor(key: "Onboarding_Demo_Title", defaultValue: "Welcome to QuickVerse")
Recommended: Although you can access the keys "inline", as showed above, we strongly recommend you store your keys in a single file for easy maintenance.
If you enable isDebugEnabled
, the SDK will print out a copy-able struct to the console, with all keys in your quickverse.io account.
class QVKey {
static let onboardingDemoTitle = "Onboarding.Demo.Title"
static let onboardingDemoBody = "Onboarding.Demo.Body"
}
You can then access your localized strings without hardcoding keys:
yourlabel.text = QuickVerse.stringFor(key: QVKey.onboardingDemoTitle)
If you update this regularly, it will also help reduce bugs, for example if you were referencing a key that was later removed from quickverse.io. Note: if you have keys in your QuickVerse.io account that uses symbols iOS doesn't accept in variable names (any of: .,-), they'll be replaced with underscores when logged above (only the property names of course, the values will match the server value).
All QuickVerse console logs start with "QuickVerse: " for easy filtering. We recommend setting QuickVerse.isDebugEnabled = true
during setup, and any time you're adding new keys.
- "START AVAILABLE LOCALIZATION KEYS" - logs an auto-generated struct of available keys for you to copy into your application.
- "Retrieving localizations for language code" - informs you which language localizations will be fetched for. Useful for testing.
- "API Key not configured" - have you called
QuickVerse.configure(apiKey: "{your-api-key}")
on app launch, before you try to fetch localizations? - "API Key incorrect" - have you added your application to quickverse.io, and are you using the correct APIKey for the current Bundle ID? QuickVerse APIkeys are specific to bundle IDs.
- "No response received" / "Localizations empty" - have you added at least one localization to your quickverse.io account?
Missing logs? Make sure you're setting QuickVerse.isDebugEnabled = true
when you configure the SDK.
- How big is your SDK? The final binary size of the QuickVerse iOS SDK is very small, just 0.01MB, or 10kb!
- How does your SDK handle limited connectivity? Our SDK requests all localizations on launch and caches them, so if there's limited connectivity later in the session, the localizations will still work.
- What kind of data does the SDK collect and how is it used? The only data our SDK transmits off the device is: language keys for translations, SDK version, and device type.
- Can we request changes? Absolutely! Please share your requests with us at team@quickverse.io and we'll review and get back to you.
Got a query or need support? We're always on hand to help with your integration & beyond. Just ping us at team@quickverse.io and we'll get back to you within your QuickVerse plan's SLA.