iOS Integration

1. Get cocoapods

To integrate the Cleardil SDK in your iOS app, use cocoapods dependency manager available from Cocoapod's website:

  $ sudo gem install cocoapods

2. Get Cleardil iOS sdk Example.
Clone iOS example to get started.

  $ git clone

Once you pulled the repo, install dependencies:

 $ cd cleardil-sdk-ios-example/iOSExample 
$ pod install
This will fetch both Cleardil SDK and Flutter dependencies and create XCode files.
Double click iOSExample.xcworkspace to load the project inside XCode:

iOS integration

Two siblings xcodeproj are present one of them named Pods which contains the dependencies and references of your existing project in Targets > General > Frameworks, Libraries and Embedded Content.

Remember to sign your project with your teams id by going to the Signing and Capabilities tab of project's settings.

3. Run sample app.
Plug your device select it as target execution device and hit the run button.

Cleardil SDK currently support only mobile device execution .

4. Basic call of Cleardil SDK in your code

Import the KycModule and KycModuleBuilder using import 'cleardil_kyc_pod', build and start the sdk as follows:

import cleardil_ios_sdk

class AppDelegate: UIResponder, UIApplicationDelegate {

  var window: UIWindow?
  var kycModule : KycModule?

  func application(_ application: UIApplication, 
    launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    // Instantiate Flutter engine
    self.kycModule = KycModuleBuilder()
      .withEnvironment(env: KycModule.Environment.SANDBOX)
      .withSdkToken(sdkToken: “f79a0adc-922b-4a7b-a688-f143a3c4df61”)
    return true

Remember to update your Info.plist with camera and microphone authorizations as follows:

    <string>Explanation on why the microphone access is needed.</string>
    <string>Explanation on why the camera access is needed.</string>

4. Advanced call
Cleardil SDK builder allows to customise user experience.
Specify which type of document is available for your clients with theses methods :

- allowPassport()
- allowIdentityCard()
- allowDriverLicense()
- withVerification()
- withSandboxEnvironment()

Example with the KycModule builder :


This code will instantiate the ClearDil Kyc Module allowing only Id CARD & Driver License.

Not specifying the Allow methods will allow everything.

Congratulations, you are now able to instanciate the Kyc view from your iOS application.