azakaw_kyc_flutter 1.1.0
azakaw_kyc_flutter: ^1.1.0 copied to clipboard
Azakaw KYC onboarding for Flutter — runs the Azakaw compliance onboarding flow in a WebView, with region and environment selection matching the Azakaw web SDK.
1.1.0 #
flutter_inappwebviewmoves to>=6.2.0-beta.3 <6.3.0. 6.2.0-beta.3 is the first release whose iOS implementation supports Swift Package Manager (no stable release does yet); 6.2.0 stable is picked up when it ships. Removes the remaining "The following plugins do not support Swift Package Manager for ios: flutter_inappwebview_ios" warning. The Android and iOS WebView implementations both move to 1.2.0-beta.3; they cannot be mixed across 6.1.x and 6.2.0. Apps that needflutter_inappwebview6.1.x stay on 1.0.1.- iOS: require
permission_handler_apple9.4.8+, its first release with Swift Package Manager support. - README: how to enable the camera permission under Swift Package Manager, including builds started from the Xcode app.
1.0.1 #
- iOS: add Swift Package Manager support. Fixes the "The following plugins do not support Swift Package Manager for ios: azakaw_kyc_flutter" build warning. CocoaPods keeps working.
- Requires Flutter 3.41+ (Dart 3.11+), which the plugin's
FlutterFrameworkSwiftPM dependency needs. Apps on older Flutter keep resolving to 1.0.0.
1.0.0 #
First release with full parity against the Azakaw web SDK
(@azakawcompliance/azakaw-web-sdk 1.1.x). Breaking.
Migration #
// 0.0.9
AzakawKyc.start(
context: context,
config: AzakawKycConfig(
sessionId: id,
environment: Environment.sandbox,
),
onComplete: () {},
onCancel: () {},
);
// 1.0.0
final result = await AzakawKyc.start(
context: context,
config: AzakawKycConfig(
sessionId: id,
region: AzakawRegion.uae,
environment: AzakawEnvironment.sandbox,
),
);
Environmentis replaced byAzakawEnvironment(sandbox,production) plus the newAzakawRegion(uae,ksa,qatar,kuwait).AzakawKycConfig.baseUrlis gone. UseresolveAzakawUrls(...)if you need the resolved hosts.AzakawKyc.startnow returnsFuture<AzakawKycResult>.onCompleteandonCancelstill exist but take anAzakawKycResult.AzakawKycDialogis replaced byAzakawKycView.isFullscreennow defaults totrue.
Fixed #
- The sandbox environment pointed at
qa-uaica2-metal.azakaw.com, an internal QA host, instead ofsandbox.azakaw.com. onCompletenever fired. The SDK loaded the portal without ahostOrigin, and the portal gates all outbound messaging on it (isSdkEnabled = !!thirdPartyOrigin), so it never emittedOnboardingCompleted. The SDK now reports an origin and bridges the portal's postMessage protocol into Dart.- The SDK loaded
/onboarding, which is not a registered route. The portal registersonboarding/:submissionId; a bare/onboardingfalls through to its not-found page on any path where the startup navigation does not run. The SDK now loads the portal root, as the web SDK does. - The portal fell back to its login screen instead of the onboarding
dashboard. The portal waits for
IframeParametersResponsewithtakeWhile(e => hostOrigin !== e.origin, true)— a stream that completes on the first message whose origin equalshostOrigin. That is written for the iframe case, wherehostOriginis the parent page. Because a WebView has no parent, this SDK reports the portal's own origin, so the portal's own outboundIframeParametersRequestcame straight back to its own listener, completed the stream before any reply could arrive, and made it abandon the session-token exchange. The bridge now interceptswindow.postMessageand routes portal → host events to Dart without re-delivering them into the page; only the reply is delivered. - Camera capture failed on Android. Nothing handled the WebView's
permission request, so the portal's
getUserMediacall was denied.permission_handlerwas a declared dependency that was imported and never called, despite the README advertising "built-in camera permission handling". - The Android system back button dismissed the flow without firing
onCancel, and without the close confirmation. sessionIdwas interpolated into the URL unescaped; a value containing&,#or a space corrupted the query. An emptysessionIdnow throws instead of sending the stringundefined.- Debug
print()calls shipped to consumers. pubspec.yamluseddefault_package— the federated-endorsement key — pointing the package at itself, so the native plugin was never registered or built on either platform.- The Android module was not a valid AGP 8 library: no
com.android.libraryplugin and nonamespace. - The podspec carried version
0.0.1and unedited template metadata (A new Flutter plugin project,example.com,Your Company), and never bundled its privacy manifest. - The example app's Android manifest declared no permissions at all, and
pinned a machine-specific
org.gradle.java.home.
Added #
AzakawRegion—uae(azakaw.com),ksa(azakawksa.com),qatar(azakawqatar.com) matching the web SDK'sSdkRegion, pluskuwait(kuwait.azakaw.com/kuwait-stg.azakaw.com), which the web SDK does not yet have.- Subdomains are now resolved per region/environment pair
(
AzakawRegion.subdomainFor) rather than from the environment alone. Kuwait shares theazakaw.comdomain with UAE and is separated by subdomain, so the oldapp/sandboxassumption does not hold for it. AzakawRegion.hasSandboxreports whether a region has a sandbox at all.hideSidebarandhideOnboardingSections, answered over the portal'sIframeParametersRequesthandshake.language— preselectsenorar, including RTL. The web SDK has no equivalent.TenantBaseUrlsupport: the portal can move the session to a tenant-specific host mid-flow. Previously the SDK sent nosdkVersion, so the portal defaulted it to1.0.0, failed its ownsemver.gt(sdkVersion, '1.0.2')gate and never sent the event at all — tenants on their own domain silently stayed on the generic host with the generic theme.resolveTenantHost(default on): reads thebaseUrlclaim from the session token before the first load and opens the WebView on the tenant's domain directly, so themed tenants never render the generic host. Falls back to theTenantBaseUrlredirect on any failure.AzakawKycResult/AzakawKycStatus/AzakawKycException, and anonErrorcallback.AzakawKycViewfor embedding the flow in your own layout.- A loading indicator and a retry-able error state.
- The plugin's own manifest now declares
INTERNETandCAMERA, withandroid.hardware.cameramarked not required. - Real unit tests: the full region × environment matrix, URL construction, the event protocol, and the close confirmation.
- Integration tests under
example/integration_test/that drive the live portal and assert the postMessage handshake round-trips, and that an invalid certificate is rejected. Verified on Android and iOS.
iOS #
- Minimum iOS raised from the template's 12.0 to 14.3 — WKWebView gained
getUserMediathere, so document capture cannot work below it. The permission callback the SDK uses is iOS 15+; on 14.3–14.x WKWebView prompts on its own viaNSCameraUsageDescription. - iOS reports the
WKMediaCaptureTypethe page asked for as a single resource, so a video-onlygetUserMediaarrives asCAMERAandCAMERA_AND_MICROPHONEonly appears when a page asks for the microphone too. The portal captures withaudio: false, so onlyCAMERAis granted and a combined request is refused — this flow never needs the microphone. - TLS handling is platform-aware. Android reports
sslErroronly on a real failure, but iOS routes every HTTPS connection through the same hook and reportsunspecified— which means success. Treating that as a failure would have blocked every valid server on iOS. - A cancelled navigation (
NSURLErrorCancelled) is routine on iOS and is no longer surfaced as an error.
Changed #
- WebView moved from
webview_fluttertoflutter_inappwebview, which is what makes the camera grant and the document-start bridge possible. - Minimum Flutter 3.24 / Dart 3.5.
0.0.9 #
- azakaw kyc onboarding flutter SDK