SDK reference · React Native SDK

Customization

The React Native SDK supports customization of text, localization, icons, videos, and visual themes. The available options and the methods used to apply them differ between Android and iOS for legacy (v1) screens - see the platform-specific sections below. The redesigned v2 screens (for example ID Scan V2) use a unified theme system that works the same way on both platforms via setTheme(); see the shared note at the bottom of this page.

Android

The following covers v1 customization options for legacy screens. For v2 customization, see the intro above.

Customization options

  • Text and localization: Override SDK strings and add languages.
  • Icons and videos: Replace SDK assets with your own.
  • Theme (ID Scan V2 only): setTheme() on Android currently supports customization exclusively for the ID Scan V2 feature. For legacy (v1) theme customization (colors, fonts, buttons, and other components), use the full guide below instead.

For configuration details, see the full Android customization guide here.

Method examples

To set the runtime localization language, call setLocalizationLanguage(). Supported values are currently en, es, and pt:

await IncodeSdk.setLocalizationLanguage('en');

To override an individual string, call setString():

IncodeSdk.setString({
  onboard_sdk_btn_passport: 'Passport',
});

To localize plural strings, call setQuantityStrings():

await IncodeSdk.setQuantityStrings({
  en: {
    onboard_sdk_validation_attempts_remaining: {
      one: '%d attempt remaining',
      other: '%d attempts remaining',
    },
  },
  es: {
    onboard_sdk_validation_attempts_remaining: {
      one: '%d intento restante',
      other: '%d intentos restantes',
    },
  },
});

Dependency requirements

The setLocalizationLanguage, setString, and setQuantityStrings methods require the Android extensions dependency:

implementation 'com.incode.sdk:extensions:1.2.1'

iOS

The following covers v1 customization options for legacy screens. For v2 customization, see the intro above.

Customization options

  • Icons and videos: Replace SDK assets with your own. See the guide here.
  • Text and localization: Override SDK strings and add languages. See the guide here.
  • Theme: Customize colors, fonts, buttons, and components.

Method examples

setLocalizationLanguage() and setString() are also available on iOS, with the same behavior as Android.

setQuantityStrings() exists on iOS for API compatibility, but it is currently a no-op there - the call resolves successfully without applying anything. Plural strings can only be localized this way on Android.

To change the theme, call setTheme with a stringified theme JSON:

const jsonTheme = JSON.stringify({
  colors: {
    accent: '#00B2FD',
    primary: '#20263D',
    background: '#FFFFFF',
  },
  // See the iOS customization guide for the full theme schema.
});

IncodeSdk.setTheme({ jsonTheme });

Dependency requirements

Unlike on Android, no additional native dependency is required for setLocalizationLanguage, setString, or setQuantityStrings on iOS.

ID v2 Customization

Both platforms support the customization of ID v2 experience via IncodeOnboardingSdk.setTheme(theme: theme):


Was this page helpful?