# SDK Setup

## Install the Accura Scan package:

`yarn add 'accurascan_kyc'`

`npm i accurascan_kyc`

#### **Usage**

Import npm library into file.

`import AccurascanKyc from 'accurascan_kyc';`

***

## Setup Android

**Add it in your root build.gradle at the end of repositories.**

```
buildscript {
...
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io/' }
        maven { url 'https://developer.huawei.com/repo/' } // Add Huawei Maven
        maven {
            url 'https://jitpack.io'
            credentials { username 'jp_45kf9tvkijvd9c7cf34mehj1b6' }
        }
    }
}
```

**Add it in your app/build.gradle file.**

```
android {
...

packagingOptions {
   pickFirst 'lib/arm64-v8a/libcrypto.so'
   pickFirst 'lib/arm64-v8a/libssl.so'

   pickFirst 'lib/armeabi-v7a/libcrypto.so'
   pickFirst 'lib/armeabi-v7a/libssl.so'

   pickFirst 'lib/x86/libcrypto.so'
   pickFirst 'lib/x86/libssl.so'

   pickFirst 'lib/x86_64/libcrypto.so'
   pickFirst 'lib/x86_64/libssl.so'

}
splits {
  abi {
    ...
    enable true
    include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
  }
 }
}
```

***

## Setup iOS

1.Install Git LFS using command install `brew install git-lfs` OR `port install git-lfs`

Verify that the installation was successful:

```
$ git lfs install
> Git LFS initialized.
```

2.Add the following in your podfile `use_frameworks!` below `prepare_react_native_project!`

and comment this line `:flipper_configuration => flipper_config`

take reference from [here](https://github.com/accurascan/React-Native-AccuraScan-KYC/blob/main/ios/Podfile)

3.Run `pod install`

**Add this permissions into iOS Info.plist file.**

```
<key>NSCameraUsageDescription</key>
<string>App usage camera for scan documents.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>App usage photos for get document picture.</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>App usage photos for save document picture.</string>
```

***

## Setup Accura Scan licenses into your projects

Accura Scan has two license require for use full functionality of this library. To generate your Accura Scan license contact <sales@accurascan.com> .

**key.license**

This license is compulsory for this library to work. it will get all setup of accura SDK.

**For Android**

```
Create "assets" folder under app/src/main and Add license file in to assets folder.
- key.license // for Accura Scan OCR
To generate your Accura Scan license contact sales@accurascan.com
```

**For iOS**

```
Place both the license in your <project name>/ios/project's directory, and add the licenses to the target.
```

<br>
