Skip to content

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

  1. Download the loxilyLocalizeSDK-1.0.0.zip file:
  1. Unzip the file to get the loxilyLocalizeSDK.xcframework folder;

  2. Drag loxilyLocalizeSDK.xcframework into your Xcode project;

  3. Configure the project settings:

    • In GeneralFrameworks, Libraries, and Embedded Content, set loxilyLocalizeSDK.xcframework to Do Not Embed (static library)
    • In Build SettingsOther Linker Flags, add -ObjC
  4. Import the header file where needed:

objc
#import <iLocalizeSDK/LoxilyLocalize.h>

Once integrated, you can proceed to initialize Loxily Localize.

Initialization

Call the initialization method in your project's AppDelegate:

objc
#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

ParameterTypeRequiredDescriptionExample
appKeyNSStringYesUnique app identifier from Loxily Localize dashboard"4b290d495c67075db7b80b845d80e244"
languageNSStringYesTarget language code"zh-cn", "en", "ja"
isInternationalizingBOOLYesInternational version (YES=overseas, NO=mainland China)YES / NO
isDebugBOOLYesEnvironment (YES=testing, NO=production)YES / NO

Initialization Callback

You can add a callback after initialization to monitor the completion status:

objc
[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.