Skip to content

zoloz-pte-ltd/zoloz-demo-ios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published