Guides

FalconSecureSDK Documentation

This article walks you through how to integrate Falcon Secure SDK into your project through the XCFramework.

Overview

The FalconSecureSDK is an iOS SDK designed to simplify the integration of secure authentication and transaction authorization processes into your iOS applications. It provides convenient methods for initiating device binding, simulating verification SMS, checking binding status, generating request tokens, sending registration SMS, initializing API connections, and making secure requests.

Table of Contents

  1. Installation
  2. Device Binding
  3. Send Registration SMS
  4. Check Binding Status
  5. Generate Request Token
  6. Initialize API
  7. Secure Request

Installation

Start by downloading and decompressing the latest version of the SDK

Adding FalconSecureSDK to your project

  • Open your project in Xcode
  • Click on your project in the Project Navigator.
  • Select your target.
  • Make sure the General tab is selected.
  • Scroll down to “Frameworks, Libraries, and Embedded Content”.
  • Drag in desired XCFrameworks from the downloaded SDK. It is wired up automatically as a dependency of your target.

Xcode will display a dialog confirming you want to add FalconSecureSDK to your project. Confirm that Copy items if needed is selected, and that your target is checked under Add to targets.

Import FalconSecureSDK

Import the SDK using the following line

import FalconSecureSDK

Initiate Device Binding

Initiate the Device Binding process using the following code

FalconSecureSDK.initiateDeviceBinding("enterprise_id", authorizationKey: "your_authorization_key", mobileNumber: "your_mobile_number", pan: "your_pan") { response, error in  
    if let error = error {  
        NSLog("Device binding error: \(error)")  
    } else {  
        NSLog("Device binding successful")  
    }  
}

Send Registration SMS

let viewController: UIViewController = // your view controller
FalconSecureSDK.sendRegistrationSMS(viewController, presentingViewController: viewController, virtualMobileNumber: "virtual_mobile_number", smsContent: "sms_content") { response, error in
    if let error = error {
        NSLog("Send registration SMS error: \(error)")
    } else {
        NSLog("Send registration SMS successful")
    }
}

Check Binding Status

FalconSecureSDK.checkBindingStatus("your_mobile_number", pan: "your_pan", token: "your_token") { response, error in
    if let error = error {
        NSLog("Check binding status error: \(error)")
    } else {
        NSLog("Check binding status successful")
    }
}

Generate Request Token

FalconSecureSDK.generateRequestToken("your_device_token", totpSecret: "your_totp_secret") { response, error in
    if let error = error {
        NSLog("Generate request token error: \(error)")
    } else {
        NSLog("Generate request token successful")
    }
}

Initialize API

FalconSecureSDK.initializeApi("your_pan", mobileNumber: "your_mobile_number", deviceToken: "your_device_token", requestToken: "your_request_token") { response, error in
    if let error = error {
        NSLog("Initialization error: \(error)")
    } else {
        NSLog("Initialization successful")
    }
}

Secure Request

FalconSecureSDK.request("action_code", payload: ["key": "value"], bankName: "bank_name", userId: "user_id", pan: "pan", requestToken: "request_token") { response, error in
    if let error = error {
        NSLog("Secure request error: \(error)")
    } else {
        NSLog("Secure request successful")
    }
}