Skip to content

Commit f08e677

Browse files
Release 2.0.0
1 parent d291cf1 commit f08e677

File tree

116 files changed

+2075
-380
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+2075
-380
lines changed

.DS_Store

-4 KB
Binary file not shown.

.fleet/receipt.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Project generated by Kotlin Multiplatform Wizard
2+
{
3+
"spec": {
4+
"template_id": "kmt",
5+
"targets": {
6+
"android": {
7+
"ui": [
8+
"compose"
9+
]
10+
},
11+
"ios": {
12+
"ui": [
13+
"compose"
14+
]
15+
}
16+
}
17+
},
18+
"timestamp": "2024-09-11T06:25:22.843200063Z"
19+
}

CHANGELOG.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,37 @@
1-
# iProov Biometrics Kotlin-Multiplatform SDK
1+
# iProov Face Kotlin-Multiplatform SDK
2+
3+
## 2.0.0
4+
5+
iProov Face Kotlin-Multiplatform SDK v2.0.0 includes the following:
6+
7+
- Adding the new Options in GenuinePresenceAssurance(controlYPosition, controlXPosition, and scanningPrompts)
8+
- New UI state API
9+
10+
### iOS
11+
12+
* SDK version [v13.1.0](https://github.com/iProov/ios/releases/tag/13.1.0).
13+
14+
### Android
15+
16+
* SDK version [v11.1.0](https://github.com/iProov/android/releases/tag/v11.1.0).
17+
218

319
## 1.0.1
420

5-
iProov Biometrics Kotlin-Multiplatform SDK v1.0.1 includes the following:
21+
iProov Face Kotlin-Multiplatform SDK v1.0.1 includes the following:
622

723
### iOS
824

925
* SDK version [v12.4.1](https://github.com/iProov/ios/releases/tag/12.4.1).
1026

27+
### Android
28+
29+
* SDK version [v10.3.2](https://github.com/iProov/android/releases/tag/v10.3.2).
30+
1131

1232
## 1.0.0
1333

14-
iProov Biometrics Kotlin-Multiplatform SDK v1.0.0 includes the following:
34+
iProov Face Kotlin-Multiplatform SDK v1.0.0 includes the following:
1535

1636
### iOS
1737

LICENSE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
iproov_kmp
22

3-
- Please refer to the iOS Biometrics SDK license here: https://github.com/iProov/ios/blob/master/LICENSE.md.
3+
- Please refer to the iOS Face SDK license here: https://github.com/iProov/ios/blob/master/LICENSE.md.
44

5-
- Please refer to the Android Biometrics SDK license here: https://github.com/iProov/android/blob/master/LICENSE.md.
5+
- Please refer to the Android Face SDK license here: https://github.com/iProov/android/blob/master/LICENSE.md.
66

77
--------------------------------------------------------------------------------
88
API Client and Sample Code

README.md

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
![iProov: Flexible authentication for identity assurance](https://github.com/iProov/kotlin-multiplatform/blob/main/banner.jpg)
2-
# iProov Biometrics Kotlin Multiplatform SDK
2+
# iProov Face Kotlin Multiplatform SDK
33

44
## Introduction
55

6-
The iProov Biometrics Kotlin Multiplatform SDK wraps iProov's native [iOS](https://github.com/iProov/ios) (Swift) and [Android](https://github.com/iProov/android) (Java) SDKs behind a Kotlin Multiplatform interface for use from within your Kotlin Multiplatform iOS or Android app.
6+
The iProov Face Kotlin Multiplatform SDK wraps iProov's native [iOS](https://github.com/iProov/ios) (Swift) and [Android](https://github.com/iProov/android) (Java) SDKs behind a Kotlin Multiplatform interface for use from within your Kotlin Multiplatform iOS or Android app.
77

88
We also provide an API Client written in Kotlin Multiplatform to call our [REST API v2](https://eu.rp.secure.iproov.me/docs.html) from the Kotlin Multiplatform Example app, which can be used to request tokens directly from the iProov API (note that this is not a secure way of getting tokens, and should only be used for demo/debugging purposes).
99

1010
### Requirements
1111

12-
- Kotlin Multiplatform SDK 2.1.21 and above
13-
- iOS 13 and above
12+
- Kotlin Multiplatform SDK 2.2.21 and above
13+
- iOS 15 and above
1414
- Android API Level 26 (Android 8 Oreo) and above
1515

1616
## Repository contents
@@ -57,7 +57,7 @@ The iProov Kotlin Multiplatform SDK is provided via this repository, which conta
5757
5858
```kotlin
5959
commonMain.dependencies {
60-
implementation('com.iproov.kmp:sdk:1.0.1')
60+
implementation('com.iproov.kmp:sdk:2.0.0')
6161
}
6262
```
6363
@@ -118,10 +118,10 @@ class IproovViewModel : ViewModel() {
118118
119119
is IproovState.Failure -> {
120120
// The user was not successfully verified/enrolled, as their identity could not be verified,
121-
// or there was another issue with their verification/enrollment. A reason (as a string)
122-
// is provided as to why the claim failed, along with a feedback code from the back-end.
123-
val feedbackCode = state.failureResult.feedbackCode
124-
val reason = state.failureResult.reason
121+
// or there was another issue with their verification/enrollment. A list of reasons is provided to understand why the claim failed, where each reason contains two properties:
122+
// - feedbackCode: A string representation of the feedback code.
123+
// - description: An informative hint for the user to increase their chances of iProoving successfully next time.
124+
val reasons = state.failureResult.reasons
125125
val frame = state.failureResult.frame // An optional image containing a single frame of the user, if enabled for your service provider
126126
}
127127
@@ -153,8 +153,8 @@ class IproovViewModel : ViewModel() {
153153

154154
👉 You should now familiarize yourself with the following resources:
155155

156-
- [iProov Biometrics iOS SDK documentation](https://github.com/iProov/ios)
157-
- [Android Biometrics Android SDK documentation](https://github.com/iProov/android)
156+
- [iProov Face iOS SDK documentation](https://github.com/iProov/ios)
157+
- [Android Face Android SDK documentation](https://github.com/iProov/android)
158158

159159
These repositories provide comprehensive documentation about the available customization options and other important details regarding the SDK usage.
160160

@@ -180,33 +180,34 @@ For full documentation, please read the respective [iOS](https://github.com/iPro
180180

181181
A summary of the support for the various SDK options in Kotlin Multiplatform is provided below. Any options not set will default to their platform-defined default value.
182182

183-
| Option | Type | iOS | Android |
184-
|---|--------------------------------------------------|---|---|
183+
| Option | Type | iOS | Android |
184+
|---|------------------------------------------------|---|---|
185185
| `filter` | `Filter` [(See filter options)](#filter-options) |||
186-
| `titleTextColor` | `Int` |||
187-
| `promptTextColor` | `Int` |||
188-
| `closeButtonTintColor` | `Int` |||
189-
| `closeButtonImage` | `ByteArray?` |||
190-
| `title` | `String` |||
191-
| `fontPath` | `String?` |||
192-
| `logoImage` | `ByteArray?` |||
193-
| `promptBackgroundColor` | `Int` |||
194-
| `promptRoundedCorners` | `Boolean` |||
195-
| `surroundColor` | `Int` |||
196-
| `certificates` | `List<Certificate>` |||
197-
| `timeout` | `Int` |||
198-
| `enableScreenshots` | `Boolean` | ||
199-
| `orientation` | `Orientation` | ||
200-
| `camera` | `Camera` | ||
201-
| `headerBackgroundColor` | `Int` |||
202-
| `disableExteriorEffects` | `Boolean` |||
203-
|**`genuinePresenceAssurance`** | `GenuinePresenceAssurance` | | |
204-
|`readyOvalStrokeColor` | `Int` |||
205-
|`notReadyOvalStrokeColor` | `Int` |||
206-
|`scanningPrompts` | `Boolean` |||
207-
|**`livenessAssurance`** | `LivenessAssurance` | | |
208-
|`ovalStrokeColor` | `Int` |||
209-
|`completedOvalStrokeColor` | `Int` |||
186+
| `titleTextColor` | `Int` |||
187+
| `promptTextColor` | `Int` |||
188+
| `closeButtonTintColor` | `Int` |||
189+
| `closeButtonImage` | `ByteArray?` |||
190+
| `title` | `String` |||
191+
| `fontPath` | `String?` |||
192+
| `logoImage` | `ByteArray?` |||
193+
| `promptBackgroundColor` | `Int` |||
194+
| `promptRoundedCorners` | `Boolean` |||
195+
| `surroundColor` | `Int` |||
196+
| `certificates` | `List<Certificate>` |||
197+
| `timeout` | `Int` |||
198+
| `enableScreenshots` | `Boolean` | ||
199+
| `orientation` | `Orientation` | ||
200+
| `headerBackgroundColor` | `Int` |||
201+
| `disableExteriorEffects` | `Boolean` |||
202+
|**`genuinePresenceAssurance`** | `GenuinePresenceAssurance` | | |
203+
|`readyOvalStrokeColor` | `Int` |||
204+
|`notReadyOvalStrokeColor` | `Int` |||
205+
|`scanningPrompts` | `Boolean` |||
206+
|`controlYPosition` | `Boolean` |||
207+
|`controlXposition` | `Boolean` |||
208+
|**`livenessAssurance`** | `LivenessAssurance` | | |
209+
|`ovalStrokeColor` | `Int` |||
210+
|`completedOvalStrokeColor` | `Int` |||
210211

211212
### Filter Options
212213

@@ -261,7 +262,6 @@ All errors from the native SDKs are re-mapped to Kotlin Multiplatform exceptions
261262
| `ListenerNotRegisteredException` | || The SDK was launched before a listener was registered. |
262263
| `MultiWindowUnsupportedException` | || The user attempted to iProov in split-screen/multi-screen mode, which is not supported. |
263264
| `CameraException` | || An error occurred acquiring or using the camera. This could happen when a non-phone is used with/without an external/USB camera. |
264-
| `FaceDetectorException` | || An error occurred with the face detector. |
265265
| `InvalidOptionsException` | || An error occurred when trying to apply your options.|
266266
| `UserTimeoutException` || | The user has taken too long to complete the claim.|
267267

@@ -331,6 +331,12 @@ In the example app folder, check the `Credentials.kt` file and add your credenti
331331

332332
> NOTE: iProov is not supported on the iOS or Android simulator, you must use a physical device in order to iProov.
333333
334+
### UIStates (optional)
335+
336+
Additionally, for those wanting to monitor the user experience, there are also UIStates, which indicate when the Session's UI starts and stops.
337+
338+
Similarly, the Session provides a `val uiState: StateFlow<IProov.UIState>` to be collected from.
339+
334340
## Help & support
335341

336342
You may find your question is answered in the documentation of our native SDKs:

exampleApp/src/commonMain/kotlin/com/iproov/example/App.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ private fun IproovStateSurface(state: IproovState?, onClosed: () -> Unit) {
140140
is IproovState.Processing -> "Processing: ${formatDouble(state.progress)}"
141141
is IproovState.Canceled -> "Canceled by ${state.canceler}"
142142
is IproovState.Error -> "Error: ${state.exception.title}"
143-
is IproovState.Failure -> "Failure: ${state.failureResult.reason}"
143+
is IproovState.Failure -> "Failure: ${state.failureResult.reasons.map { "[${it.feedbackCode} : ${it.description}]" }}"
144144
is IproovState.Success -> "Success"
145145
else -> ""
146146
}

gradle/libs.versions.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[versions]
22
agp = "8.5.2"
3-
android-compileSdk = "34"
3+
android-compileSdk = "36"
44
android-minSdk = "26"
5-
android-targetSdk = "34"
5+
android-targetSdk = "36"
66
androidx-activityCompose = "1.9.2"
77
androidx-lifecycle = "2.8.0"
88
compose-plugin = "1.6.11"
9-
kotlin = "2.1.21"
9+
kotlin = "2.2.21"
1010
ktor = "2.3.12"
1111
startup-runtime = "1.2.0"
12-
iproov-android = "10.3.2"
13-
iproov-sdk-version = "1.0.1"
12+
iproov-android = "11.1.0"
13+
iproov-sdk-version = "2.0.0"
1414

1515
[libraries]
1616
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activityCompose" }

iosApp/iosApp.xcodeproj/project.pbxproj

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
058557BB273AAA24004C7B11 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557BA273AAA24004C7B11 /* Assets.xcassets */; };
1111
058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */; };
1212
2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2152FB032600AC8F00CF470E /* iOSApp.swift */; };
13-
4E1AB6F02E1D16F2003A9B4E /* iProov in Frameworks */ = {isa = PBXBuildFile; productRef = 4E1AB6EF2E1D16F2003A9B4E /* iProov */; };
13+
4EA4C04C2EC3387F006DACC7 /* iProov in Frameworks */ = {isa = PBXBuildFile; productRef = 4EA4C04B2EC3387F006DACC7 /* iProov */; };
1414
7555FF83242A565900829871 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7555FF82242A565900829871 /* ContentView.swift */; };
1515
/* End PBXBuildFile section */
1616

@@ -42,7 +42,7 @@
4242
isa = PBXFrameworksBuildPhase;
4343
buildActionMask = 2147483647;
4444
files = (
45-
4E1AB6F02E1D16F2003A9B4E /* iProov in Frameworks */,
45+
4EA4C04C2EC3387F006DACC7 /* iProov in Frameworks */,
4646
);
4747
runOnlyForDeploymentPostprocessing = 0;
4848
};
@@ -121,7 +121,7 @@
121121
);
122122
name = iosApp;
123123
packageProductDependencies = (
124-
4E1AB6EF2E1D16F2003A9B4E /* iProov */,
124+
4EA4C04B2EC3387F006DACC7 /* iProov */,
125125
);
126126
productName = iosApp;
127127
productReference = 7555FF7B242A565900829871 /* KMP Example App.app */;
@@ -153,7 +153,7 @@
153153
);
154154
mainGroup = 7555FF72242A565900829871;
155155
packageReferences = (
156-
4E1AB6EE2E1D168F003A9B4E /* XCRemoteSwiftPackageReference "ios-spm" */,
156+
4EA4C04A2EC3387F006DACC7 /* XCRemoteSwiftPackageReference "ios-spm" */,
157157
);
158158
productRefGroup = 7555FF7C242A565900829871 /* Products */;
159159
projectDirPath = "";
@@ -323,6 +323,7 @@
323323
IPHONEOS_DEPLOYMENT_TARGET = 15.3;
324324
MTL_ENABLE_DEBUG_INFO = NO;
325325
MTL_FAST_MATH = YES;
326+
ONLY_ACTIVE_ARCH = YES;
326327
SDKROOT = iphoneos;
327328
SWIFT_COMPILATION_MODE = wholemodule;
328329
SWIFT_OPTIMIZATION_LEVEL = "-O";
@@ -333,6 +334,7 @@
333334
7555FFA6242A565B00829871 /* Debug */ = {
334335
isa = XCBuildConfiguration;
335336
buildSettings = {
337+
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
336338
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
337339
CODE_SIGN_IDENTITY = "Apple Development";
338340
CODE_SIGN_STYLE = Automatic;
@@ -354,12 +356,13 @@
354356
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}";
355357
PRODUCT_NAME = "${APP_NAME}";
356358
PROVISIONING_PROFILE_SPECIFIER = "";
357-
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
358-
SUPPORTS_MACCATALYST = NO;
359+
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
360+
SUPPORTS_MACCATALYST = YES;
359361
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
360362
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
361363
SWIFT_VERSION = 5.0;
362364
TARGETED_DEVICE_FAMILY = "1,2";
365+
ss = "";
363366
};
364367
name = Debug;
365368
};
@@ -384,15 +387,17 @@
384387
"$(inherited)",
385388
"@executable_path/Frameworks",
386389
);
390+
ONLY_ACTIVE_ARCH = NO;
387391
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}";
388392
PRODUCT_NAME = "${APP_NAME}";
389393
PROVISIONING_PROFILE_SPECIFIER = "";
390-
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
394+
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
391395
SUPPORTS_MACCATALYST = NO;
392396
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
393397
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
394398
SWIFT_VERSION = 5.0;
395399
TARGETED_DEVICE_FAMILY = "1,2";
400+
ss = "";
396401
};
397402
name = Release;
398403
};
@@ -420,20 +425,20 @@
420425
/* End XCConfigurationList section */
421426

422427
/* Begin XCRemoteSwiftPackageReference section */
423-
4E1AB6EE2E1D168F003A9B4E /* XCRemoteSwiftPackageReference "ios-spm" */ = {
428+
4EA4C04A2EC3387F006DACC7 /* XCRemoteSwiftPackageReference "ios-spm" */ = {
424429
isa = XCRemoteSwiftPackageReference;
425430
repositoryURL = "https://github.com/iProov/ios-spm";
426431
requirement = {
427432
kind = upToNextMajorVersion;
428-
minimumVersion = 12.4.1;
433+
minimumVersion = 13.0.0;
429434
};
430435
};
431436
/* End XCRemoteSwiftPackageReference section */
432437

433438
/* Begin XCSwiftPackageProductDependency section */
434-
4E1AB6EF2E1D16F2003A9B4E /* iProov */ = {
439+
4EA4C04B2EC3387F006DACC7 /* iProov */ = {
435440
isa = XCSwiftPackageProductDependency;
436-
package = 4E1AB6EE2E1D168F003A9B4E /* XCRemoteSwiftPackageReference "ios-spm" */;
441+
package = 4EA4C04A2EC3387F006DACC7 /* XCRemoteSwiftPackageReference "ios-spm" */;
437442
productName = iProov;
438443
};
439444
/* End XCSwiftPackageProductDependency section */

iosApp/iosApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)