Getting Started
This chapter walks through the three steps to integrate the Loxily Localize iOS SDK into your app: first register the application on the Loxily Localize dashboard to obtain an App Key, then add the XCFramework to your Xcode project, and finally call [LoxilyLocalize initWithAppKey:...] in your AppDelegate. Once these three steps are done, you can use features like fetching translations and switching languages.
Register Your Application
Before integrating the SDK, you need to create a project on the Loxily Localize Open Platform and obtain:
- App Key — unique app identifier, required for SDK initialization
- App Secret — used by server-side API signing (client SDKs don't use this directly, but both share the same application)
Sign in to the Loxily Localize console → select or create a project → navigate to Integration / Open Platform → copy the App Key for later use. If you don't have console access yet, please contact your Loxily point of contact.
SDK Integration
XCFramework Integration (Recommended)
- Download the
loxilyLocalizeSDK-1.0.0.zipfile:
Unzip the file to get the
loxilyLocalizeSDK.xcframeworkfolder;Drag
loxilyLocalizeSDK.xcframeworkinto your Xcode project;Configure the project settings:
- In
General→Frameworks, Libraries, and Embedded Content, setloxilyLocalizeSDK.xcframeworktoDo Not Embed(static library) - In
Build Settings→Other Linker Flags, add-ObjC
- In
Import the header file where needed:
#import <iLocalizeSDK/LoxilyLocalize.h>Once integrated, you can proceed to initialize Loxily Localize.
Initialization
Call the initialization method in your project's AppDelegate:
#import <loxilyLocalizeSDK/loxilyLocalizeSDK.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// SDK initialization
[LoxilyLocalize initWithAppKey:@"YOUR_APP_KEY"
language:@"zh-cn"
isInternationalizing:YES
isDebug:NO];
return YES;
}Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| appKey | NSString | Yes | Unique app identifier from Loxily Localize dashboard | "4b290d495c67075db7b80b845d80e244" |
| language | NSString | Yes | Target language code | "zh-cn", "en", "ja" |
| isInternationalizing | BOOL | Yes | International version (YES=overseas, NO=mainland China) | YES / NO |
| isDebug | BOOL | Yes | Environment (YES=testing, NO=production) | YES / NO |
Initialization Callback
You can add a callback after initialization to monitor the completion status:
[LoxilyLocalize setTranslationPreparedCallback:^(bool success) {
if (success) {
// SDK initialized successfully, translation files are ready
NSLog(@"Initialization successful");
} else {
// SDK initialization failed
NSLog(@"Initialization failed");
}
}];Important:
The initialization callback is asynchronous. Make sure the callback returns success before using other SDK features.
Once initialized, continue to Core Features to learn how to fetch translations and switch languages.