Skip to content

Commit

Permalink
2.9.3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
sergress committed Oct 16, 2019
1 parent aafd484 commit 737817e
Show file tree
Hide file tree
Showing 6 changed files with 174 additions and 4 deletions.
93 changes: 93 additions & 0 deletions 2.9.3/Liveness3D.md
@@ -0,0 +1,93 @@
# KYC-iOS-Release 2.9.3

## Liveness3D module

### Installation
This framework ment to be installed via [cocoapods](https://cocoapods.org/).

* Add to your `Podfile` specs repositories: `SumSubstance/Specs`, and public one - `CocoaPods/Specs`
* Specify `use_frameworks!` option
* Add dependency `SumSubstanceKYC/Liveness3D` to your target

Resulting `Podfile` could look as follows:
```ruby
platform :ios, '9.3'

source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/SumSubstance/Specs.git'

use_frameworks!

target 'MyAwesomeApp' do

pod 'SumSubstanceKYC/Liveness3D'

# any other dependencies
end
```
* Run `pod install --repo-update`

### Usage
Instantiate the module and pass handlers
```objc
SSLiveness3D *liveness3D =
[SSLiveness3D.alloc initWithBaseUrl:baseUrl
token:token
locale:locale
tokenExpirationHandler:^(void (^ _Nonnull completionHandler)(NSString * _Nullable))
{
// get new token then call completionHandler
getNewToken(^(NSString *token) {
completionHandler(token);
};

} completionHandler:^(UIViewController * _Nonnull controller, SSLiveness3DStatus status, SSLiveness3DResult * _Nullable result) {

// process status then update UI accordingly

// possible statuses are:
// SSLiveness3DStatus_Cancelled,
// SSLiveness3DStatus_InitializationFailed,
// SSLiveness3DStatus_CameraPermissionDenied,
// SSLiveness3DStatus_TokenIsInvalid,
// SSLiveness3DStatus_FaceMismatched,
// SSLiveness3DStatus_VerificationPassedSuccessfully,

[controller dismissViewControllerAnimated:YES completion:nil];
}];
```
Where
* `applicantID` - identifier of the applicant to check against
* `baseUrl` - `test-msdk.sumsub.com` for test environment or `msdk.sumsub.com` for production one
* `token` - your Sum&Sub auth token
* `locale` - user locale (preferably `NSLocale.currentLocale.localeIdentifier`, but you can use any)
* optionally one can use `liveness3D.theme` property to assign a customized set of colors
Note please that being once initialized the overall process is looped until cancelled or completes successfully. So normally you never got `SSLiveness3DStatus_FaceMismatched` completion status. Use the following to change this behaviour.
```objc
liveness3D.shouldCompleteOnFaceMismatch = YES;
```

Also there is an optional way to get the server response right after it arrives from the server. That allows you to process the result asynchronously and possibly cancel the further processing.
```objc
// The block must call `completionHandler` provided with a boolean parameter. Passing `YES` stops the further processing.

liveness3D.resultHandler = ^(SSLiveness3DResult * _Nonnull result, void (^ _Nonnull completionHandler)(BOOL)) {

NSLog(@"Coordinator: Liveness3D got result from server: %@", result);

completionHandler(NO);
};

```

Then create and display UI
```objc
UIViewController *vc = [liveness3D getController];

vc.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;

[self.navigationController presentViewController:vc animated:YES completion:nil];
```
For usage example refer to [demo project](https://github.com/SumSubstance/KYC-iOS-Demo).
53 changes: 53 additions & 0 deletions 2.9.3/README.md
@@ -0,0 +1,53 @@
# KYC-iOS-Release 2.9.3

:point_right: *Take a look [here](Liveness3D.md) if you'd like to use Liveness3D module only.*

### Installation
This framework ment to be installed via [cocoapods](https://cocoapods.org/).

* Add to your `Podfile` specs repositories: `SumSubstance/Specs`, and public one - `CocoaPods/Specs`
* Specify `use_frameworks!` option
* Add dependency `SumSubstanceKYC` to your target

Resulting `Podfile` could look as follows:
```ruby
platform :ios, '9.3'

source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/SumSubstance/Specs.git'

use_frameworks!

target 'MyAwesomeApp' do

pod 'SumSubstanceKYC'

# any other dependencies
end
```
* Run `pod install --repo-update`

### Usage
To instantiate framework call
```objc
SSEngine *engine = [SSFacade setupForApplicant:applicantID
withToken:authToken
locale:locale
supportEmail:supportEmail
baseUrl:baseUrl
colorConfig:colorConfigOrNil
imageConfig:imageConfigOrNil];
```
Where
* `applicantID` - your applicant identifier
* `authToken` - your Sum&Sub auth token
* `locale` - user locale (preferably `NSLocale.currentLocale.localeIdentifier`, but you can use any)
* `colorConfigOrNil` - nil or subclass of `KYCColorConfig` (for color pallet customization)
* `imageConfigOrNil` - nil or subclass of `KYCImageConfig` (for icons customization)
Then, you should:
* Connect to remote - `[engine connectWithExpirationHandler:verificationResultHandler:]; `
* Create KYC UI - `[SSFacade getChatControllerWithAttributedTitle:titleOrNil]`
* Refresh auth token (when needed) - `engine.refreshToken = newToken;`
For more usage examples refer to [demo project](https://github.com/SumSubstance/KYC-iOS-Demo).
Binary file added 2.9.3/SumSubstanceKYC.zip
Binary file not shown.
24 changes: 22 additions & 2 deletions Liveness3D.md
@@ -1,4 +1,4 @@
# KYC-iOS-Release 2.9.2
# KYC-iOS-Release 2.9.3

## Liveness3D module

Expand Down Expand Up @@ -41,7 +41,7 @@ SSLiveness3D *liveness3D =
completionHandler(token);
};

} completionHandler:^(UIViewController * _Nonnull controller, SSLiveness3DStatus status) {
} completionHandler:^(UIViewController * _Nonnull controller, SSLiveness3DStatus status, SSLiveness3DResult * _Nullable result) {

// process status then update UI accordingly

Expand All @@ -50,17 +50,37 @@ SSLiveness3D *liveness3D =
// SSLiveness3DStatus_InitializationFailed,
// SSLiveness3DStatus_CameraPermissionDenied,
// SSLiveness3DStatus_TokenIsInvalid,
// SSLiveness3DStatus_FaceMismatched,
// SSLiveness3DStatus_VerificationPassedSuccessfully,

[controller dismissViewControllerAnimated:YES completion:nil];
}];
```
Where
* `applicantID` - identifier of the applicant to check against
* `baseUrl` - `test-msdk.sumsub.com` for test environment or `msdk.sumsub.com` for production one
* `token` - your Sum&Sub auth token
* `locale` - user locale (preferably `NSLocale.currentLocale.localeIdentifier`, but you can use any)
* optionally one can use `liveness3D.theme` property to assign a customized set of colors
Note please that being once initialized the overall process is looped until cancelled or completes successfully. So normally you never got `SSLiveness3DStatus_FaceMismatched` completion status. Use the following to change this behaviour.
```objc
liveness3D.shouldCompleteOnFaceMismatch = YES;
```

Also there is an optional way to get the server response right after it arrives from the server. That allows you to process the result asynchronously and possibly cancel the further processing.
```objc
// The block must call `completionHandler` provided with a boolean parameter. Passing `YES` stops the further processing.

liveness3D.resultHandler = ^(SSLiveness3DResult * _Nonnull result, void (^ _Nonnull completionHandler)(BOOL)) {

NSLog(@"Coordinator: Liveness3D got result from server: %@", result);

completionHandler(NO);
};

```

Then create and display UI
```objc
UIViewController *vc = [liveness3D getController];
Expand Down
2 changes: 1 addition & 1 deletion README.md
@@ -1,4 +1,4 @@
# KYC-iOS-Release 2.9.2
# KYC-iOS-Release 2.9.3

:point_right: *Take a look [here](Liveness3D.md) if you'd like to use Liveness3D module only.*

Expand Down
6 changes: 5 additions & 1 deletion SumSubstanceKYC.json
@@ -1,5 +1,9 @@
{
"2.6": "https://raw.githubusercontent.com/SumSubstance/KYC-iOS-Release/master/2.6/SumSubstanceKYC.zip",
"2.7": "https://raw.githubusercontent.com/SumSubstance/KYC-iOS-Release/master/2.7/SumSubstanceKYC.zip",
"2.8": "https://raw.githubusercontent.com/SumSubstance/KYC-iOS-Release/master/2.8/SumSubstanceKYC.zip"
"2.8": "https://raw.githubusercontent.com/SumSubstance/KYC-iOS-Release/master/2.8/SumSubstanceKYC.zip",
"2.9": "https://raw.githubusercontent.com/SumSubstance/KYC-iOS-Release/master/2.9/SumSubstanceKYC.zip",
"2.9.1": "https://raw.githubusercontent.com/SumSubstance/KYC-iOS-Release/master/2.9.1/SumSubstanceKYC.zip",
"2.9.2": "https://raw.githubusercontent.com/SumSubstance/KYC-iOS-Release/master/2.9.2/SumSubstanceKYC.zip",
"2.9.3": "https://raw.githubusercontent.com/SumSubstance/KYC-iOS-Release/master/2.9.3/SumSubstanceKYC.zip"
}

0 comments on commit 737817e

Please sign in to comment.