> For the complete documentation index, see [llms.txt](https://api2-ekycapis.innov8tif.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api2-ekycapis.innov8tif.com/okaycam-mobile-sdk/okaycam-mobile-sdk-all/installation-guide.md).

# Installation Guide

### OkayCam&#x20;

{% tabs %}
{% tab title="Android" %}

### Android Installation Guide

*<mark style="color:blue;">Note: Please make sure the SDK version tally with the provided license key.</mark>*&#x20;

OkayCam SDK is available through maven central repo. To install it, add following dependency in `app/build.gradle` dependencies block:

```
dependencies {
    implementation('com.innov8tif.okaycam:OkayCam:3.0.0') {
        transitive = true
    }
}   
```

Also add following repo in project root `build.gradle`:

```
allprojects {
    repositories {
        maven {
            url "https://innov8tif-okaycam.firebaseapp.com"
            content {
                includeGroup "com.innov8tif.xendity"
            }
        }
    }
}
```

#### License Key

The license key is a `string` which you need to request from Innov8tif. In the following usage example, we put as `LICENSE_KEY` but you can use whatever variable name you want.

#### Starting Camera

* Camera can be launched by invoking **start** method on OkayCamDoc with context,config and callback method as follow
* config object is optional if you call from Kotlin (refer to Configuration for more info)
* after the image is captured or the user cancel, the callback method will be called (refer result)

```
OkayCamDoc.start(this,LICENSE_KEY, config) { success, images, exception ->
    // do something with the result
}
```

{% endtab %}

{% tab title="iOS" %}

### iOS Installation Guide

In iOS, OkayCam is available through the [CocoaPods](https://guides.cocoapods.org/using/using-cocoapods.html). The first step of the installation for OkayCam in iOS is to simply add the following line of code to your Podfiles as shown below:

*<mark style="color:blue;">Note: Please make sure the SDK version tally with the provided license key.</mark>*&#x20;

```swift
  use_frameworks!
  pod 'OkayCam'
```

After adding the code above to the Podfiles:

* Run the command `pod install` to install the dependency
* Add `NSCameraUsageDescription` to the `info.plist` in order to gain camera permissions

{% hint style="info" %}
For iOS versions, we are actively published to Cocoapods. User can keep track of the version using the [site](https://cocoapods.org/). However, in the site, user will need to type in "OkayCam" in the search bar to view the latest version.
{% endhint %}
{% endtab %}

{% tab title="React-Native" %}

### React-Native Installation Guide

In React-native, the first step of the installation is to install the react-native OkayCam into the environment using the command below:

*<mark style="color:blue;">Note: Please make sure the SDK version tally with the provided license key.</mark>*&#x20;

*<mark style="color:orange;">**Version 3:**</mark>*

<pre><code><strong>$ yarn add react-native-okaycam@3.x.x   - For version 3 
</strong></code></pre>

*<mark style="color:orange;">**Version 1:**</mark>*

<pre><code><a data-footnote-ref href="#user-content-fn-1">$</a> react-native install react-native-okaycam@1.1.28
</code></pre>

#### For Android in React-Native:

1. Navigate to `android` folder
2. Add following snippet in the root `build.gradle` file:

```
allprojects {
    repositories {
        maven {
            url "https://innov8tif-okaycam.firebaseapp.com"
            content {
                includeGroup "com.innov8tif.xendity"
            }
        }
    }
}
```

3. Sync Gradle

#### For iOS in React-native:

1. Navigate to iOS folder
2. Add the following code to Podfile

```swift
platform :ios, '15.0'
use_frameworks!

post_install do |installer|
  installer.pods_project.targets.each do |target|

    if target.name == 'FBReactNativeSpec'
      target.build_phases.each do |build_phase|
        if build_phase.respond_to?(:name) && build_phase.name == '[CP-User] Generate Specs'
          target.build_phases.move(build_phase, 0)
        end
      end
    end

    target.build_configurations.each do |config|
      config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
      config.build_settings["ONLY_ACTIVE_ARCH"] = "NO"
    end

  end
end
```

After adding the code above to the Podfiles:

* Run the command `pod install` to install the dependency
* Add "NSCameraUsageDescription" to the info.plist in order to gain camera permissions

{% hint style="info" %}
For React-Native versions, we are actively published to npm. User can keep track of the version using the [site](https://www.npmjs.com/package/react-native-okaycam).
{% endhint %}

## Issues

#### Android:

1. There will be a duplicate class "org.hamcrest.xxx"

If the above error is encountered, it can be solved by excluding the "**junit**" module below:

```
configurations { compile.exclude group: "junit", module: "junit" }
```

#### iOS:

1. There will be several issues stated in the quote below:

> Undefined symbol: \_*swift\_FORCE\_LOAD*$\_swiftUniformTypeIdentifiers
>
> Undefined symbol: \_*swift\_FORCE\_LOAD*$\_swiftCoreMIDI

If users encountered the errors above, it can be solved by creating a new swift file called **Void.swift** without adding a **bridging header**.

![](/files/J93sM5x3tXZXNgZnclGP)

## License

After that, a license key is required for both Android and iOS by adding the code below:

```
const license = Platform.select({
    android: "",
    ios: ""
})
```

{% endtab %}

{% tab title="Flutter" %}
Please refer to

OkayCam SDK V1

{% embed url="<https://gitlab.com/innov8tif-public/flutter/okaycam-flutter-demo>" %}

OkayCam SDK V2

{% embed url="<https://gitlab.com/innov8tif-public/flutter/okaycam-flutter-demo/-/tree/main-v2>" %}

OkayCam SDK V3

<https://gitlab.com/innov8tif-public/flutter/okaycam-flutter-demo/-/tree/main-v3?ref_type=heads>
{% endtab %}
{% endtabs %}

{% hint style="info" %}
Please be aware of the codes and commands above are **case sensitive.**
{% endhint %}

[^1]:


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://api2-ekycapis.innov8tif.com/okaycam-mobile-sdk/okaycam-mobile-sdk-all/installation-guide.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
