# Installation Guide

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

### Android Installation Guide

The first step of the installation for OkayID Lite in Android is to include the following dependencies in the project-level build.gradle file. The build.gradle file will need to make some changes as follow below:

```
allprojects {
    repositories {
        ...
        mavenCentral()
    }
}
```

Include the following dependencies in the app-level build.gradle file as shown below:

```
dependencies {
    implementation 'com.innov8tif.okayidlite:OkayIDLite:1.0.2'
}
```

After adding the code, sync the project with gradle files to make sure all of the dependencies is successfully installed.
{% endtab %}

{% tab title="iOS" %}

### iOS Installation Guide

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

```
use_frameworks!
pod 'OkayIDLite', '1.0.10'

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if target.name == "CryptoSwift"
            puts "Enable module stability for CryptoSwift"
            target.build_configurations.each do |config|
                config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
            end
        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
  {% endtab %}

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

### React-native Installation Guide

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

```
$ react-native install react-native-okayid-lite
```

#### For iOS in React-native:

Navigate to the iOS folder and add the following code to the Podfiles:

```
platform :ios, '11.0'
use_frameworks!

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if target.name == "CryptoSwift"
			        puts "Enable module stability for CryptoSwift"
			        target.build_configurations.each do |config|
				            config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES' 
				    end
        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
* Add `${PODS_ROOT}/GoogleMLKit/MLKitCore/Sources` to Pod Project Header Search Path

![](https://253651193-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpQle72tz7-gm8Gk4Bg%2F-M_-eVNhOeVYBQjIO1-B%2F-M_-h5PFK6KevbHVTrtW%2Fdependency.png?alt=media\&token=d1f86d73-ab8b-4de5-8966-21ed4dbfbdcf)

* Add "NSCameraUsageDescription" to the info.plist in order to gain camera permissions

## Issues

#### 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**.

![](https://253651193-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpQle72tz7-gm8Gk4Bg%2F-M_-eVNhOeVYBQjIO1-B%2F-M_-hLCCV2iAvlcx49A-%2Fvoid9.jpg?alt=media\&token=10e07b4c-a1cf-4324-9a5a-015a90765cb8)

## 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 %}
{% endtabs %}

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