Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
174 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |