Giter Site home page Giter Site logo

zoloz-demo-ios's Introduction

ZOLOZ iOS Example

Background

This repository provide an example to help customer to integrate ZOLOZ SDK with ease.

Getting started

Prequisites

  • iOS developer tools

Building from Source

git clone https://github.com/zoloz-pte-ltd/zoloz-demo-ios
cd zoloz-demo-ios
rm -f Podfile.lock
pod install --repo-update
open ZolozDemo.xcworkspace
<Run app from xcode>

You can omit --repo-update to speed up the installation, but watch out as you may be building against outdated dependencies.

Example usage

  1. Refer to this example to setup a minimum web server to act as your biz server bridging the demo app and the RealId service.

  2. Open the application, fill the inbox of "HOST" with "http://lan_ip:lan_port"

example homepage

  1. Click "start zoloz" button to start the eKYC flow.

SDK Integration

  1. Add private specs to your Podfile:

    source "https://github.com/zoloz-pte-ltd/zoloz-demo-ios"
  2. Add the pod to your Podfile:

    pod 'zolozkit'
  3. And then run:

    pod install
  4. Add -ObjC and $(inherited) in Other Linker Flags

    add other linkner flag

  5. Get meta info

    NSString *metainfo = [ZLZFacade getMetaInfo];
  6. Send the meta info to your biz server, and call RealId intialize API with meta info from your server to obtain the runtime configurations.

  7. Construct ZLZRequest object with clientCfg returned from RealId server and public key generated by your biz server :

    NSString *clientConfig = clinetCfg;
    //.pass the current ViewController to bizConfig
    NSMutableDictionary *bizConfig = [NSMutableDictionary dictionary];
    [bizConfig setObject:self forKey:kZLZCurrentViewControllerKey];
    //.pass the public key to bizConfig
    [bizConfig setObject:publicKey forKey:kZLZPubkey];
    //.pass the locale to bizConfig
    [bizConfig setObject:locale forKey:kZLZLocaleKey]
    ZLZRequest *request = [[ZLZRequest alloc] initWithzlzConfig:clientConfig bizConfig:bizConfig];
  8. Start the ZOLOZ SDK with ZLZRequest and you need to implement the callback functions to handle the eKYC outcome.

    [[ZLZFacade sharedInstance] startWithRequest:request completeCallback:^(ZLZResponse *response) {
      
    } interruptCallback:^(ZLZResponse *interrupt){
      
    }];

    The eKYC outcome only contains a simple code demostrating the status of the eKYC process, you have to call RealId checkResult API to get detailed information of the eKYC process.

zoloz-demo-ios's People

Contributors

zolozadmin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.