# iOS SDK

## FACEKI-BLAZE-IOS SDK

### Overview

The FACEKI-BLAZE-IOS SDK is an iOS framework developed by Faceki, providing advanced eKYC (Electronic Know Your Customer) and Facial Recognition capabilities for iOS applications. This SDK enables seamless identity verification using document and selfie verification.

### Installation

CocoaPods

To integrate FACEKI-BLAZE-IOS SDK into your Xcode project using CocoaPods, add the following lines to your `Podfile`:

Latest Version: 3.2

````
```ruby
target 'YourProjectName' do
  pod 'FACEKI-BLAZE-IOS', '~> 3.0.0'
end
````

Then, run the following command:

```
$ pod install
```

### Manual Installation

You can also manually integrate the FACEKI-BLAZE-IOS SDK into your project. Download the SDK from [GitHub releases](https://github.com/faceki/blaze-ios-sdk/releases) and follow the instructions provided in the documentation.

**Permission**

Add the following usage descriptions to your Info.plist

```
<key>NSCameraUsageDescription</key>
<string>For taking photos for kyc</string>

```

#### Initialization

You would need to generate EKYC Link through the API here:

<https://docs.faceki.com/api-integration/verification-apis/generate-kyc-link>

In the response use the key "data" to initiate the SDK

```swift
import FACEKI_BLAZE_IOS

class YourViewController: UIViewController {

    @IBAction func captureAction(_ sender: Any) {
        let smManagerVC = Logger.initiateSMSDK(
            verificationLink: "Verification UUID Generate By API",
            workflowId: "Workflow ID",
            setOnComplete: onComplete,
            redirectBack: onRedirectBack,
            selfieImageUrl: nil,
            cardGuideUrl: nil
        )
        navigationController?.pushViewController(smManagerVC, animated: true)
    }

    // ... (rest of your ViewController code)

}
```

### Usage

#### Callbacks

Implement the following callbacks to handle the SDK responses:

Callback that will recieve the response back from the API for data level information [https://docs.faceki.com](https://docs.faceki.com/)

```
func onComplete(data:[AnyHashable:Any]){
    print("API Response")
    print(type(of: data))

    if let dataObject = data["result"] as? [AnyHashable: Any]{
        print(dataObject["requestId"]!)
        print(dataObject["decision"]!)

    }
    
}

// Redirect After Result Screen

func onRedirectBack() {
    DispatchQueue.main.async {
        // Perform UI work here
        self.navigationController?.popToRootViewController(animated: true)
    }
}
```

### Requirements

* Swift 5.0
* iOS 13.0 and later

### Need Support?&#x20;

Contact us on WhatsApp [Click here ](https://wa.me/+13026131330)<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.faceki.com/mobile-sdk/ios-sdk.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.
