Skip to content

Bump SDKs #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-13]
os: [macos-15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.2.14

* Bump Android to 0.7.12
* Bump iOS to 0.6.4
* Added `allowCameraOnNFCTask`, `exitOnRetryThresholdReached` and `nfcTimeoutThreshold` to `IdentityBuilder`.

## 0.2.13

* Bump Android to 0.7.11
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,24 @@ To configure how often a user can attempt a task before the contact support butt
```dart
identityBuilder.retryThreshold = 1;
```
To configure if the SDK should quit instead of showing the support button you can set the following:
```dart
identityBuilder.exitOnRetryThresholdReached = true;
```

### Allow Camera On NFC Task

To configure whether a user can skip NFC and use OCR instead.
```dart
identityBuilder.allowCameraOnNFCTask = true;
```

### NFC Timeout Threshold

To configure how long the NFC detecting stays active you can set a timeout.
```dart
identityBuilder.nfcTimeoutThreshold = 5.0;
```

### Language

Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ android {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
def klippaIdentityVerificationVersion = project.hasProperty('klippaIdentityVerificationVersion') ? project.klippaIdentityVerificationVersion : "0.7.11"
def klippaIdentityVerificationVersion = project.hasProperty('klippaIdentityVerificationVersion') ? project.klippaIdentityVerificationVersion : "0.7.12"
implementation "com.klippa:identity_verification:$klippaIdentityVerificationVersion"
}
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,18 @@ class KlippaIdentityVerificationSdkPlugin : FlutterPlugin, MethodCallHandler, Ac
identitySession.retryThreshold = retryThreshold
}

call.argument<Double>("NfcTimeoutThreshold")?.let { nfcTimeoutThreshold ->
identitySession.nfcTimeoutThreshold = nfcTimeoutThreshold
}

call.argument<Boolean>("AllowCameraOnNFCTask")?.let { allowCameraOnNFCTask ->
identitySession.allowCameraOnNFCTask = allowCameraOnNFCTask
}

call.argument<Boolean>("ExitOnRetryThresholdReached")?.let { exitOnRetryThresholdReached ->
identitySession.exitOnRetryThresholdReached = exitOnRetryThresholdReached
}

val intent = identitySession.getIntent(activity)
resultHandler = result
activity.startActivityForResult(intent, REQUEST_CODE)
Expand Down Expand Up @@ -177,7 +189,9 @@ class KlippaIdentityVerificationSdkPlugin : FlutterPlugin, MethodCallHandler, Ac
IdentitySessionResultCode.DEVICE_NFC_DISABLED,
IdentitySessionResultCode.TAKING_PHOTO_FAILED,
IdentitySessionResultCode.UNKNOWN_ERROR,
IdentitySessionResultCode.INCORRECT_SESSION_SETUP -> identityVerificationCanceled(mappedResultCode.message())
IdentitySessionResultCode.INCORRECT_SESSION_SETUP,
IdentitySessionResultCode.ALLOW_PICTURE_FALLBACK_DISABLED,
IdentitySessionResultCode.RETRY_LIMIT_REACHED -> identityVerificationCanceled(mappedResultCode.message())
}

return true
Expand Down
72 changes: 36 additions & 36 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
5D68064C33EC95D915B56E13 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB9067BC56822A46D3A92665 /* Pods_Runner.framework */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
905C478025554A7100106A33 /* KlippaIdentityVerification.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 905C477F25554A7100106A33 /* KlippaIdentityVerification.xcframework */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
EDC811C2EC4F9FA06DC4C5B7 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EFAAD64FA968EAAEE0C119E0 /* Pods_Runner.framework */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
13C27A86687E5C239201756E /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
2FAC5DEF20FE521586BC3081 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
4A6948D82D018BCC00089CF0 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
6D0B49640ECC799CB7C3844F /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
7F20B48587D6CB8B5DABF0B2 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
905C477F25554A7100106A33 /* KlippaIdentityVerification.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = KlippaIdentityVerification.xcframework; path = "Pods/Klippa-Identity-Verification/KlippaIdentityVerification.xcframework"; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
Expand All @@ -35,8 +35,8 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
9E50C2824AF5C311E0A6D978 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
DB9067BC56822A46D3A92665 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E200A18C74797E1C4043E60A /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
EFAAD64FA968EAAEE0C119E0 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -45,7 +45,7 @@
buildActionMask = 2147483647;
files = (
905C478025554A7100106A33 /* KlippaIdentityVerification.xcframework in Frameworks */,
5D68064C33EC95D915B56E13 /* Pods_Runner.framework in Frameworks */,
EDC811C2EC4F9FA06DC4C5B7 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -56,7 +56,7 @@
isa = PBXGroup;
children = (
905C477F25554A7100106A33 /* KlippaIdentityVerification.xcframework */,
DB9067BC56822A46D3A92665 /* Pods_Runner.framework */,
EFAAD64FA968EAAEE0C119E0 /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -110,9 +110,9 @@
C39B3574C306087E5F5946A5 /* Pods */ = {
isa = PBXGroup;
children = (
6D0B49640ECC799CB7C3844F /* Pods-Runner.debug.xcconfig */,
7F20B48587D6CB8B5DABF0B2 /* Pods-Runner.release.xcconfig */,
9E50C2824AF5C311E0A6D978 /* Pods-Runner.profile.xcconfig */,
13C27A86687E5C239201756E /* Pods-Runner.debug.xcconfig */,
2FAC5DEF20FE521586BC3081 /* Pods-Runner.release.xcconfig */,
E200A18C74797E1C4043E60A /* Pods-Runner.profile.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
Expand All @@ -124,14 +124,14 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
51CD7BDEDF9B2B6212879DFB /* [CP] Check Pods Manifest.lock */,
FCDDB368174EEF8C0DB34520 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
F1241E6A83E306EBCDFC8441 /* [CP] Embed Pods Frameworks */,
462768B22CF9FDB0297459D4 /* [CP] Copy Pods Resources */,
AC92FC26F6D8DAFD052729D1 /* [CP] Embed Pods Frameworks */,
813F5B163A41EF4FE9B197E7 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -206,7 +206,7 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n";
};
462768B22CF9FDB0297459D4 /* [CP] Copy Pods Resources */ = {
813F5B163A41EF4FE9B197E7 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand All @@ -223,58 +223,58 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
51CD7BDEDF9B2B6212879DFB /* [CP] Check Pods Manifest.lock */ = {
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
name = "Run Script";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
AC92FC26F6D8DAFD052729D1 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "Run Script";
outputPaths = (
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
F1241E6A83E306EBCDFC8441 /* [CP] Embed Pods Frameworks */ = {
FCDDB368174EEF8C0DB34520 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
16 changes: 16 additions & 0 deletions ios/Classes/SwiftKlippaIdentityVerificationSdkPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,18 @@ public class SwiftKlippaIdentityVerificationSdkPlugin: NSObject, FlutterPlugin,
if let retryThreshold = builderArgs["RetryThreshold"] as? Int {
builder.retryThreshold = retryThreshold
}

if let allowCameraOnNFCTask = builderArgs["AllowCameraOnNFCTask"] as? Bool {
builder.allowCameraOnNFCTask = allowCameraOnNFCTask
}

if let exitOnRetryThresholdReached = builderArgs["ExitOnRetryThresholdReached"] as? Bool {
builder.exitOnRetryThresholdReached = exitOnRetryThresholdReached
}

if let nfcTimeoutThreshold = builderArgs["NfcTimeoutThreshold"] as? Double {
builder.nfcTimeoutThreshold = nfcTimeoutThreshold
}

resultHandler = result
let viewController = builder.build()
Expand Down Expand Up @@ -152,6 +164,10 @@ public class SwiftKlippaIdentityVerificationSdkPlugin: NSObject, FlutterPlugin,
return "No internet connection"
case KlippaError.NfcNotSupported:
return "NFC not supported"
case KlippaError.AllowPictureFallbackDisabled:
return "Allow Picture Fallback Disabled"
case KlippaError.RetryLimitReached:
return "Retry Limit Reached"
}
}()

Expand Down
2 changes: 1 addition & 1 deletion ios/sdk_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.3
0.6.5
22 changes: 22 additions & 0 deletions lib/klippa_identity_verification_sdk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ class IdentityBuilder {
/// The threshold the user can attempt a task before a contact support button is shown.
int? retryThreshold;

/// Whether the SDK shows an additional button on the NFC screen to use OCR instead.
bool? allowCameraOnNFCTask;

/// Whether the SDK quits instead of showing a contact support button when the `retryThreshold` was reached.
bool? exitOnRetryThresholdReached;

// The threshold of the NFC document detection, if not document is detected within the time period the detection stops.
double? nfcTimeoutThreshold;

/// Overwrite the fonts object with [newFonts] for the builder.
setFonts(KIVFonts newFonts) {
this.fonts = newFonts;
Expand Down Expand Up @@ -198,6 +207,19 @@ class KlippaIdentityVerificationSdk {
parameters["RetryThreshold"] = builder.retryThreshold;
}

if (builder.allowCameraOnNFCTask != null) {
parameters["AllowCameraOnNFCTask"] = builder.allowCameraOnNFCTask;
}

if (builder.exitOnRetryThresholdReached != null) {
parameters["ExitOnRetryThresholdReached"] =
builder.exitOnRetryThresholdReached;
}

if (builder.nfcTimeoutThreshold != null) {
parameters["NfcTimeoutThreshold"] = builder.nfcTimeoutThreshold;
}

final Map startSessionResult =
await _channel.invokeMethod('startSession', parameters);
return startSessionResult;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: klippa_identity_verification_sdk
description: Allows you to do identity verification with the Klippa Identity Verification SDK from Flutter apps.
version: 0.2.13
version: 0.2.14
homepage: https://github.com/klippa-app/flutter-klippa-identity-verification-sdk

environment:
Expand Down
Loading