deepidsdk_flutter 2.0.0
deepidsdk_flutter: ^2.0.0 copied to clipboard
Flutter plugin for the DeepID SDK (Android + iOS). Provides SIM binding, device enrollment, and fraud detection capabilities.
2.0.0 #
Breaking: device intelligence is now computed entirely by the DeepID backend on both platforms. The SDK still collects device facts and sends them, but no longer derives scores or verdicts on-device, and iOS ships a smaller binary.
deviceIntelligenceinEnrollmentResult(and fromgetFreshDeviceIntelligence()) is now whatever the backend returns, and isnulluntil your backend starts sending the field. If your code reads specific keys such asdevice_score, re-check that logic — the shape has changed.getFreshDeviceIntelligence()now always makes a network round trip on iOS, matching Android.- SIM binding's verification timeout is now 45 seconds on both platforms (previously 15s on Android, 20s on iOS).
- SIM binding now fails if the app is backgrounded for more than 5 seconds
while the flow is in progress — a new possible cause of a
simBindingFailederror. - Fixed an iOS bug where the SIM binding confirmation screen could show a blank SIM name on single-SIM devices.
- Breaking:
DeepId.logout()now returnsFuture<bool>(trueif an active session was cleared,falseif there was nothing to log out of) instead ofFuture<void>. Existing calls that don't use the return value are unaffected.
Upgrading:
flutter clean
rm -rf ~/.pub-cache/hosted/pub.dev/deepidsdk_flutter-*
cd ios && rm -rf Pods Podfile.lock && pod install
Android just needs a rebuild with the new deepidsdk.aar.
1.0.5 #
- Feature: added
DeepId.logout()— clears the current enrolled session (deepId, sessionId, DeepId credentials, SIM binding state, and any locally persisted identifier) on both Dart and native sides. Afterlogout(), callinginitialize()again performs a fresh enrollment and fires theonEnrollmentcallback with a newdeepId/sessionId. Safe to call when no session is active; a pendingonEnrollmentis rejected with the messageEnrollment cancelled by logout(). Example app demonstrates the flow with a new "Logout" button under "Initialize & Enroll". - Fix (Android):
EnrollmentResult.deepIdis now stable across process restarts, matching the contract documented on the field. On the second-and-subsequent launches with an existing enrollment, the plugin was delivering a different identifier than the one returned on the first fresh enrollment. The plugin now persists the correct identifier from the first enrollment and returns it on every subsequent restore. - Fix (Android + iOS):
DeepId.getFreshDeviceIntelligence()now works on every launch, not only the first fresh enrollment. Previously, on a second-and-subsequent launch with an existing enrollment, the native device-intelligence collector was never re-initialized in the new process, so the call resolved withnull("Fresh device intelligence is unavailable"). The underlying SDKs now lazily re-create the collector on demand, the first timegetFreshDeviceIntelligence()is invoked after a process start. - Migration: If you tested against 1.0.4 or earlier and observed the wrong
deepIdon subsequent launches, clear the app's storage once after upgrading (Android Settings → Apps → Storage → Clear Data, or uninstall + reinstall). Devices that never ran an affected build are not impacted. The fresh device intelligence fix requires no migration. - Requires updated native binaries — replace
deepidsdk.aarand the iOS xcframeworks under~/.pub-cache/hosted/pub.dev/deepidsdk_flutter-1.0.5/with the matching artifacts from DeepID.
1.0.4 #
- Fix (build-blocking): corrected minimum iOS target to 15.0 (was 13.0) — podspec, example Podfile, and Xcode project updated.
- Fix (build-blocking): corrected minimum Android API to 29 (was 21) — manifest-merger fails for hosts below API 29.
- Fix (documentation): Added troubleshooting steps for the iOS release build.
1.0.3 #
- iOS: refreshed
DeepIdSDK.xcframeworkwith an updated device-identifier source for the enrollment and SIM binding callbacks. ThedeepIdfield name, type, and shape are unchanged — existing integrations require no code changes, though the returned identifier value may differ after re-enrollment. - iOS: internal native plugin-bridge updates to match the refreshed binary.
- No public Dart API changes.
1.0.2 #
- iOS: added
ShieldPtr.xcframeworkas a required vendored framework alongsideDeepIdSDK.xcframework. Both must be placed underios/Frameworks/before runningpod install. - Documentation: updated Prerequisites, "Verify before continuing", iOS setup, and Troubleshooting sections to reflect the second xcframework requirement.
1.0.1 #
- Documentation: clarified that native SDK binaries must be placed inside the
pub cache directory (
~/.pub-cache/hosted/pub.dev/deepidsdk_flutter-<version>/), not a local plugin checkout. - Documentation: corrected
enrollmentTimeoutdefault from 30 s to 150 s in the API reference and error-handling sections. - Documentation: corrected iOS
mobilefield description — server value is returned first,phoneNumberparameter is the fallback. - Documentation: renamed Android binary from
deepidsdk-release.aartodeepidsdk.aarthroughout.
1.0.0 #
Initial release of deepidsdk_flutter.
Features #
DeepId.initialize(appKey:, appSecret:, onEnrollment:, onEnrollmentError:, enrollmentTimeout:)— initializes the native SDK and kicks off background device enrollment. Returns once the SDK is constructed (does not wait for enrollment to complete). PassonEnrollmenthere or callDeepId.onEnrollment()separately to be notified whendeepId+sessionIdare ready.DeepId.onEnrollment(onSuccess:, onError:, timeout:)— callback-driven enrollment listener. Fires exactly once when both identifiers are available, or delivers aDeepIdExceptionon timeout or failure.DeepId.startSimBinding({phoneNumber})— presents the native SIM binding sheet (Android: Jetpack Compose Activity; iOS: SwiftUI page sheet). Awaits user confirmation and carrier verification, then returns aSimBindingResult.DeepId.isInitialized— async getter;trueafter a successfulinitialize()call.DeepId.deepId/DeepId.sessionId— synchronous accessors populated after the enrollment callback fires.
Types #
EnrollmentResult— carriesdeepIdandsessionIdfrom a completed enrollment.SimBindingResult— carriessuccess,deepId,sessionId,mobile, andmessagefrom a completed SIM binding flow.DeepIdException— typed exception with aDeepIdErrorCodeand a human-readablemessage. Thrown byinitialize()andstartSimBinding(), and passed toonEnrollmentError.DeepIdErrorCode— exhaustive enum covering all failure modes:notInitialized,invalidAppKey,invalidAppSecret,initFailed,enrollmentTimeout,enrollmentNotComplete,simBindingFailed,userCancelled, and more.
Platform support #
| Platform | Minimum version |
|---|---|
| Android | API 21 (Android 5.0) |
| iOS | 13.0 |
Notes #
- The native SDK binaries (Android AAR and iOS xcframework) are distributed
separately by DeepID and are not bundled in this package. See the
README.mdPrerequisites section for placement instructions. - On Android,
READ_PHONE_STATEandSEND_SMSare dangerous permissions that must be granted at runtime before callingstartSimBinding(). - On iOS, add
NSMotionUsageDescriptionto yourInfo.plistbefore submitting to the App Store.