Installation and Usage

Card91 Transaction iOS Framework

Card91 Transaction List iOS Framework Integration with Native iOS Apps


Purpose of this document is to illustrate the method to add Card91 ‘Card91Transactions’ library to any iOS native application written in swift invoked either from a ViewController or an UIView.

Card91 Card91Transactions Framework allows developers to add the webview component into their layout as per design.

Developers need to get the view onto their UIView and through invoking the viewDidLoad method with certain required parameters mentioned below and a library for viewing the card details can be utilised.


iOS Minimum Requirements :

Deployment Target - 14.0 or above


Below steps followed to integrate the Framework

Adding the framework

Add the xcframework file provided by us by drag and drop into the project "Frameworks,Libraries, and Embedded Content’ to “Embed & Sign".

Importing the framework

Framework will be ready to use after their adding on ViewController.
Create an IBOutlet of View(xib) and assign the “TransactionsList” class to the view in the storyboard
Use this Card91Transactions framework by importing.
Make sure not to keep any background colour of the webview since it is supposed to be transparent.

Initialising the Card91Transactions Instance

Get the instance of the added Card91Transactions onto your ViewController.
As shown in the example below .
Set the Listener as given below

        @IBOutlet weak var card91Transaction: TransactionsList!
    override func viewDidLoad() {
        // Do any additional setup after loading the view.
        let popView = TransactionsList.instanceFromNib(self,
         cardId: "*****",                       //Enter the cardId
         token: "*****",    //Enter the sdkAuthToken
         env: "*****",                                                   //Enter the env
         height: self.card91Transaction.frame.height,                          //Enter the height of the outlet
         width: self.card91Transaction.frame.width,                            //Enter the width of the outlet
         xAxis: UIScreen.main.bounds.origin.x,                          //Enter the origin x-Coordinates
         yAxis: UIScreen.main.bounds.origin.y,                          //Enter the origin y-coordinates
         templateId: "***")                                           //Enter the template Id
         popView.delegate = self

Input parameters

Call the init() method of the Card91ResetAtmPin with the below parameter .

cardIdstringtruecardId which has been received form login token service (Card91 API)
tokenstringtrueAuth Token received from the Card91 APIs
templateIdstringtrueTemplate id by default its "xoltt" or "default"
envstringtrue"PROD" in case of production and "PROD_SANDBOX" on sandbox environment
heightdoubletrueEnter the Outlet frame height
widthdoubletrueEnter the Outlet frame width
xAxisdoubletrueEnter the origin X-coordinates
yAxisdoubletrueEnter the origin Y-coordinates

Call Back methods

Extend the protocol WebViewListener for listening to the call back event from the webview.

Interface has below and their usage.

    func onPageFinished(message: String) {
    func onPageStarted(message: String) {
    func onPageError(message: String) {
    func onTransactionEvent(message: String) {

onPageStarted is called when the webpage is loaded.
onPageFinished is called when webpage loading is finished .
onPageError is called when there is any error while loading the page.
onTransactionEvent is called when transaction is initialised, detail is show, error or success event has happened.


The events are as follows:

Event NameDescription
c91_TXN_SCREEN_SUCCESSCalled when the server-side APIs load data successfully.
C91_TXN_AUTHENTICATION_FAILURECall back event type when client is passing incorrect or expired auth token.
C91_TXN_MISSING_PARAMETERCall back event type when client is not passing any required/blank parameter .
C91_TXN_SERVER_FAILURECall back event type when there is server service exception with error code 500 to 599
C91_TXN_SCREEN_INITIALISEDCalled when the transaction list is initialised.
C91_TXN_API_FAILURECalled when the server-side api failed.