# Setup Accura License and Configurations

To generate your Accura Scan license contact <sales@accurascan.com>

**Step 1:  Add license file in to your project.**\
`key.license` &#x20;

{% hint style="info" %}
Make sure to rename your license with the proper name and format, which is key with the extension license. Eventually, it will look like key.license
{% endhint %}

**Step 2: To initialize sdk on app start:**

```
import AccuraOCR
var accuraCameraWrapper: AccuraCameraWrapper? = nil
var arrCountryList = NSMutableArray()
accuraCameraWrapper = AccuraCameraWrapper.init()
	let sdkModel = accuraCameraWrapper.loadEngine(your PathForDirectories)
	if (sdkModel.i > 0) {
		if(sdkModel!.isBankCardEnable) {
			self.arrCountryList.add("Bank Card")
		}
		if(sdkModel!.isMRZEnable) {
			self.arrCountryList.add("All MRZ")
			// ID MRZ
			// Visa MRZ
			// Passport MRZ
			// All MRZ
		}
		
		// if sdkModel.isOCREnable then get card data

		if (sdkModel.isOCREnable) let countryListStr = self.videoCameraWrapper?.getOCRList();
			if (countryListStr != null) {
				for i in countryListStr!{
					self.arrCountryList.add(i)
				}
			}
		}
		if(sdkModel!.isBarcodeEnable) {
			self.arrCountryList.add("Barcode")
		}
	}
	arrCountryList to get value(forKey: "card_name") //get card Name
	arrCountryList to get value(forKey: "country_id") //get country id
	arrCountryList to get value(forKey: "card_id") //get card id
```

**Step 2.1: Update filters config like below.**

Call this function after initialize sdk if license is valid(sdkModel.i > 0)

* Set Blur Percentage to allow blur on document

```
// 0 for clean document and 100 for Blurry document
self.accuraCameraWrapper?.setBlurPercentage(60/*blurPercentage*/)
```

* Set Blur Face Percentage to allow blur on detected Face

```
// 0 for clean face and 100 for Blurry face
accuraCameraWrapper?.setFaceBlurPercentage(80/*faceBlurPercentage*/)
```

* Set Glare Percentage to detect Glare on document

```
// Set min and max percentage for glare
accuraCameraWrapper?.setGlarePercentage(6/*minPercentage*/, 98/*maxPercentage*/)
```

* Set Photo Copy to allow photocopy document or not

```
// Set allow photocopy document or not
accuraCameraWrapper?.setCheckPhotoCopy(false/*isCheckPhotoCopy*/)
```

* Set Hologram detection to verify the hologram on the face

```
// true to check hologram on face
accuraCameraWrapper?.setHologramDetection(true/*isDetectHologram*/)
```

* Set Low Light Tolerance to allow lighting to detect documant

```
// 0 for full dark document and 100 for full bright document
accuraCameraWrapper?.setLowLightTolerance(10/*lowlighttolerance*/)
```

* Set motion threshold to detect motion on camera document

```
// 1 - allows 1% motion on document and
// 100 - it can not detect motion and allow document to scan.
accuraCameraWrapper?.setMotionThreshold(25/*setMotionThreshold*/)
```

* Sets camera Facing front or back camera

```
accuraCameraWrapper?.setCameraFacing(.CAMERA_FACING_BACK)
```

* Flip camera

```
accuraCameraWrapper?.switchCamera()
```

* Set Front/Back Side Scan

```
accuraCameraWrapper?.cardSide(.FRONT_CARD_SCAN)
```

<br>


---

# Agent Instructions: 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:

```
GET https://docs.accurascan.com/language/ios/accura-ocr/setup-accura-license-and-configurations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
