This repository provide an example to help customer to integrate ZOLOZ SDK with ease.
- iOS developer tools
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.
-
Refer to this example to setup a minimum web server to act as your biz server bridging the demo app and the RealId service.
-
Open the application, fill the inbox of "HOST" with "http://lan_ip:lan_port"
- Click "start zoloz" button to start the eKYC flow.
-
Add private specs to your Podfile:
source "https://github.com/zoloz-pte-ltd/zoloz-demo-ios"
-
Add the pod to your Podfile:
pod 'zolozkit'
-
And then run:
pod install
-
Add
-ObjC
and$(inherited)
in Other Linker Flags -
Get meta info
NSString *metainfo = [ZLZFacade getMetaInfo];
-
Send the meta info to your biz server, and call RealId intialize API with meta info from your server to obtain the runtime configurations.
-
Construct
ZLZRequest
object withclientCfg
returned from RealId server andpublic 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];
-
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.