> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chmodlab.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> The SDK configuration object, its screen toggles, and how it maps across platforms.

The configuration you pass alongside the token controls how the flow looks and behaves.
Every field has a default, so an empty configuration is valid and you only set what you
want to change.

<CodeGroup>
  ```swift iOS lines theme={null}
  let configuration = ChmodKycConfiguration(
      appearance:                 appearance,       // Colors, corners and typography
      locale:                     locale,           // Languages and copy overrides
      documentCapture:            documentCapture,  // Document scanning behaviour
      showsWelcomeScreen:         true,             // Intro screen listing the required steps
      showsResultScreen:          false,            // Final screen rendered by the SDK
      showsErrorDetail:           false,            // Includes technical detail in error messages
      requiresLocationPermission: true              // Asks for location before starting
  )

  let request = ChmodKycRequest(
      baseURL:       url,
      sdkToken:      token,
      configuration: configuration
  )
  ```

  ```kotlin Android lines theme={null}
  val config = SdkConfig(
      appearance = appearance,                              // Colors, shapes and typography
      locale = locale,                                      // Languages and copy overrides
      documentCapture = documentCapture,                    // Document scanning behaviour
      showWelcomeScreen = true,                             // Intro screen listing the required steps
      showResultScreen = false,                             // Final screen rendered by the SDK
      showErrorDetail = false,                              // Includes technical detail in error messages
      locationPermission = LocationPermissionMode.REQUIRED  // REQUIRED, OPTIONAL, DISABLED
  )

  val request = ChmodKycRequest(baseUrl = baseUrl, sdkToken = token, sdkConfig = config)
  ```
</CodeGroup>

<CardGroup cols={3}>
  <Card title="Appearance" icon="palette" href="/sdk/configuration/appearance">
    Theme, colors, corners and typography.
  </Card>

  <Card title="Localization" icon="language" href="/sdk/configuration/localization">
    Languages and copy overrides.
  </Card>

  <Card title="Document capture" icon="camera" href="/sdk/configuration/document-capture">
    Detection, capture mode, preview and retakes.
  </Card>
</CardGroup>

## Screen toggles

<ParamField body="showsWelcomeScreen / showWelcomeScreen" type="boolean" default="true">
  An intro screen listing the steps the user is about to go through.

  Worth keeping. Users who know a selfie is coming are less likely to abandon at the
  liveness step. Turn it off only if your own screen already explains the flow.
</ParamField>

<ParamField body="showsResultScreen / showResultScreen" type="boolean" default="true">
  A final screen rendered by the SDK after the flow ends, whether it succeeded or failed.

  Turn this off when you want to render your own outcome screen — the result is returned
  to you either way, so nothing is lost.
</ParamField>

<ParamField body="showsErrorDetail / showErrorDetail" type="boolean" default="false">
  Includes technical detail in the error messages shown to the user.
</ParamField>

<Warning>
  `showErrorDetail` is a debugging aid. Leave it `false` in production: the detail is
  written for developers, and telling a user precisely which check rejected them tells an
  attacker precisely what to change.
</Warning>

## Location permission

This controls whether the SDK asks for location at the start of the flow.

<CodeGroup>
  ```swift iOS theme={null}
  ChmodKycConfiguration(requiresLocationPermission: true)
  ```

  ```kotlin Android theme={null}
  SdkConfig(locationPermission = LocationPermissionMode.REQUIRED)  // REQUIRED, OPTIONAL, DISABLED
  ```
</CodeGroup>

| Mode | Behaviour |
| - | - |
| `REQUIRED` | Asks for location; refusing ends the flow with a permission failure |
| `OPTIONAL` | Asks for location; the flow continues if refused |
| `DISABLED` | Never asks |

Only enable it if you use `on_gps_mock_location` or `on_gps_ip_location_mismatch` in [device policy](/configuration/device-policy). It is an extra prompt early in the flow, and some users drop out there.

<Info>
  On iOS, `requiresLocationPermission: true` also needs `NSLocationWhenInUseUsageDescription` in your `Info.plist`. See [iOS installation](/sdk/ios/installation).
</Info>

## Build the config where?

Unlike the [transaction configuration](/configuration/overview), this one is purely cosmetic and behavioural — it decides what the flow looks like, never what gets accepted. It is safe to build it in the app.

<Warning>
  Verification rules — thresholds, accepted documents, expected data — live in the
  transaction config on your **server**. Nothing in the SDK configuration can weaken a
  verification, and nothing that could should ever be put here.
</Warning>

## Platform naming

The same concepts, spelled to each platform's conventions:

| Concept | iOS | Android |
| - | - | - |
| Root object | `ChmodKycConfiguration` | `SdkConfig` |
| Appearance | `.Appearance` | `SdkConfig.Appearance` |
| Colors | `.ThemeColors` | `SdkConfig.ThemeColors` |
| Typography | `.Typography` | `SdkConfig.Typography` |
| Corner style | `corners:` on `Appearance` | `SdkConfig.Shapes(ShapePreset...)` |
| Localization | `.Locale` | `SdkConfig.Locale` |
| Copy override | `.init(language:key:value:)` | `SdkConfig.Translation(...)` |
| Document capture | `.DocumentCapture` | `SdkConfig.DocumentCapture` |
| Welcome screen | `showsWelcomeScreen` | `showWelcomeScreen` |
| Location | `requiresLocationPermission` | `locationPermission` |

Color keys, localization keys and enum values are identical across platforms, so a design
spec or a copy deck written once applies to both.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.