> For the complete documentation index, see [llms.txt](https://docs.vida.id/identity-stack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vida.id/identity-stack/verify/kyc-mobile-sdk/integration-overview/ios-sdk/customization/sdk-customization.md).

# SDK Customization

### VIDAKYCUIConfig

The `VIDAKYCUIConfig` class allows comprehensive UI customization:

```kotlin
let uiConfig = VIDAKYCUIConfig(
    showTutorial: true,
    showDocumentSelection: true,
    hidePassportOption: false,
    primaryButtonBgColor: UIColor.systemGreen,
    primaryButtonTextColor: UIColor.white,
    primaryButtonCornerRadius: 8.0,
    headerBgColor: UIColor.systemBackground,
    headerTextColor: UIColor.label,
    headerIconsTintColor: UIColor.label,
    cameraOverlayOpacity: 1.0,
    cameraOverlayBgColor: UIColor.black,
    cameraOverlayBlurStyle: .systemMaterialDark,
    cameraOverlayProgressBgColor: UIColor.gray,
    cameraOverlayProgressColor: UIColor.systemGreen
    fontProvider: myCustomFontProvider() // VIDAKYCFontProvider? 
instance
)
```

### **UI Configuration Parameters**

| Option                       | Description                                                                                |
| ---------------------------- | ------------------------------------------------------------------------------------------ |
| showTutorial                 | Enable/disable tutorial page                                                               |
| showDocumentSelection        | Enable/disable document selection page                                                     |
| hidePassportOption           | Disable passport option in selection                                                       |
| primaryButtonBgColor         | Primary button background color                                                            |
| primaryButtonTextColor       | Primary button text color                                                                  |
| primaryButtonCornerRadius    | Corner radius of primary button                                                            |
| headerBgColor                | Header navigation background color                                                         |
| headerTextColor              | Header title text color                                                                    |
| headerIconsTintColor         | Header icons tint color                                                                    |
| cameraOverlayOpacity         | Opacity of camera overlay                                                                  |
| cameraOverlayBgColor         | Camera overlay background color                                                            |
| cameraOverlayBlurStyle       | Blur style for camera overlay                                                              |
| cameraOverlayProgressBgColor | Progress view background color                                                             |
| cameraOverlayProgressColor   | Progress view color                                                                        |
| fontProvider                 | Customers can use VIDAKYCFontProvider to inject custom fonts for all texts within the SDK. |

### Color Customization

You can customize colors to match your app's branding:

```kotlin
let customColors = VIDAKYCUIConfig(
    primaryButtonBgColor: UIColor(red: 0.0, green: 0.74, blue: 0.37, alpha: 1.0),
    primaryButtonTextColor: .white,
    headerBgColor: .systemBackground,
    headerTextColor: .label,
    cameraOverlayProgressColor: UIColor(red: 0.0, green: 0.74, blue: 0.37, alpha: 1.0)
)
```

### Custom Tutorial Screens

You can customize the tutorial screens by using **VIDAKYCViewFactory**. The factory protocol provides 2 optional functions to provide viewcontrollers for tutorial pages for document capture and liveness. Make sure to call the corresponding action delegate functions within the viewcontrollers to manage the flow.

```kotlin
public protocol VIDAKYCTutorialActionDelegate {
    func proceed()
    func cancel()
}

public protocol VIDAKYCLivenessTutorialActionDelegate {
    func proceedToLiveness()
    func cancelLiveness()
}

public protocol VIDAKYCViewFactory {
    func createDocCaptureTutorialPage(with delegate: VIDAKYCTutorialActionDelegate) -> UIViewController?
    func createLivenessTutorialPage(with delegate: VIDAKYCLivenessTutorialActionDelegate) -> UIViewController?
}
```

### Localization

The SDK includes built-in support for the following languages:

* English (en) - Default
* Indonesian (id)

To use a supported language, pass the ISO 639-1 language code when initializing:

```kotlin
vidaKYC.initialize(
    kycConfig: kycConfig,
    presentNavigationController: navigationController,
    languageCode: "id" // Indonesian
)
```

**Adding Custom Languages**

To add support for additional languages not included in the SDK:

1. Add a Localizable.strings file to your app for the desired language
2. Provide translations for all SDK string keys (refer to the SDK's localization keys)
3. Pass the language code when initializing

The SDK will use your app's localized strings for any languages you provide translations for.

### Error Configuration

The VIDAKYCErrorConfig class manages error handling and retry logic:

```kotlin
let errorConfig = VIDAKYCErrorConfig(
    supportConfig: supportConfig,
    noOfRetries: 3,
    considerWarnings: false
)
```

### **Support Configuration**

```kotlin
let supportConfig = VIDAKYCErrorSupport(
    supportType: .email,
    supportValue: "support@yourcompany.com"
)
```

### **VIDAKYCErrorSupportType**

```kotlin
public enum VIDAKYCErrorSupportType: Int {
 	case email
 	case phone
}
```
