> For the complete documentation index, see [llms.txt](https://docs.accurascan.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.accurascan.com/solutions/nfc-scanner/react-native/sdk-setup.md).

# SDK Setup

### &#x20;Installation

`yarn add https://git.accurascan.com/mahdi/react-nativei-nfc.git`\
`or`\
`npm i https://git.accurascan.com/mahdi/react-nativei-nfc.git`

### **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://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`

Note: Add the NFC Entitlement in your target

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

```
<key>NSCameraUsageDescription</key>
<string>App usage camera for scan documents.</string>
<key>NFCReaderUsageDescription</key>
<string>App requires NFC access</string>
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
    <string>A0000002471001</string>
    <string>A0000002472001</string>
    <string>00000000000000</string>
</array>
```

### 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 the license in your <project name>/ios/project's directory, and add the licenses to the target.
```

<br>
