Repository navigation
Prepare the wrapper for the Bank and Location steps and report retryBlocked on iOS - #26
Merged
Merged
Conversation
…ntinuation of DID-5660) Opened by a BotInc run. Delivery follows the workflow's review and merge policy.
…ntinuation of DID-5660) Opened by a BotInc run. Delivery follows the workflow's review and merge policy.
…ntinuation of DID-5660) Opened by a BotInc run. Delivery follows the workflow's review and merge policy.
…ntinuation of DID-5660) Opened by a BotInc run. Delivery follows the workflow's review and merge policy.
…ntinuation of DID-5660) Opened by a BotInc run. Delivery follows the workflow's review and merge policy.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Workflows can include a Bank verification step and a Location verification step. The native iOS and Android SDKs draw both screens and report the same
VerificationResultas every other step, so the Dart API does not change. This pull request prepares the wrapper for them, and makes the iOS bridge report the nativeretryBlockederror the way Android already does.NSLocationWhenInUseUsageDescription, plus the optional precise-location purpose keyDiditLocationVerification) and their translations. Android location permissions (merged from the native SDK) and how to remove them. App Store and Google Play privacy declarations. A "Bank and Location Steps" section with an availability note.retryBlockedin the error types table.retryBlocked: the iOS plugin used to report the nativeVerificationError.retryBlockedasunknown. It now reportsretryBlocked, as the Android plugin does, so Dart receivesVerificationErrorType.retryBlockedwith the declined session on both platforms. The Dart types, the result map and Android are unchanged. The native iOS 4.9.1 binaries the plugin pins (all four variants) declare this case.example/integration_test/retry_blocked_test.dart, run bytool/ios_bridge_test.shin a new "Bridge test (iOS)" CI step):DiditSdk.startVerificationWithWorkflow. The plugin presents the native SDK the way it does in an app, and the released native 4.9.1 SDK sends its real session request.tool/stand_in_api.py, a local stand-in for the verification API. The script maps the API host to it in/etc/hostsand has the simulator trust a throwaway certificate authority. The stand-in gives the answer the API gives a person whose earlier session was declined and who has no retries left (status: Declined,can_retry: false)..diditVerificationcallback with.failed(.retryBlocked, declined session). The test asserts in Dart that the result isVerificationFailedwithVerificationErrorType.retryBlocked, the stand-in's session id andVerificationStatus.declined.Info.plist) and Spanish (es.lproj/InfoPlist.strings, bundled in the Xcode project).DIDIT_SDK_IOS_SOURCEPodfile hook that builds the native SDK from a source tree with itsDiditSDK/Locationmodule. An empty value counts as unset.--dart-define=DIDIT_LANGUAGE=<code>to pick the verification language.DiditSdk), run by the Android CI job:VerificationResult.fromMapreads,retryBlockedincluded.example/ios/RunnerTests), run by the iOS CI job on a simulator against the released native binaries: argument validation, configuration parsing (Spanish) and result mapping,retryBlockedincluded. The test target builds for iOS 15, the minimum the default native variant needs, so it can import the plugin module.retryBlockedfailure answered over the method channel resolvesstartVerificationWithWorkflowtoVerificationFailedwithVerificationErrorType.retryBlockedand the declined session. Also a Spanish device locale on both entry points, a declined session, an unsupported-step failure, and the example app's location setup.Podfile.lock: itsPODFILE CHECKSUMnow matches the edited Podfile (CocoaPods records the SHA-1 of the Podfile). The resolved pods are unchanged.CONTRIBUTING.mdlists how to run each test suite, the iOS bridge test included.Merge gate: waits for the native release
Do not merge this pull request until a native SDK release that includes both steps exists, and this pull request's pins and its iOS Location consumer setup have been moved to that release and tested together.
The native SDK pins stay at the published 4.9.1 until then. Checked again on 2026-10-08 at 07:07 UTC: 4.9.1 (released 2026-10-06) is still the latest native release on both platforms (the newest sdk-ios tag and GitHub release, the newest sdk-android GitHub release, and the newest
me.didit:didit-sdkversion in the sdk-android Maven repository), and it includes neither step. The native pull requests that add the steps are still open. Pinning an unpublished version would break every consumer build and both example builds in CI.The pin bump also drops the README availability note, adds the changelog entry, and adds the consumer switch for the iOS
DiditSDK/Locationmodule (CocoaPods and Swift Package Manager), which the released binaries do not include yet. CI then reruns the iOS bridge test, the XCTests and both example builds against the new binaries.Squash-merge only, and replace the pre-filled commit description. Do not use a merge commit or a rebase merge. The branch's commit messages come from automation and carry an internal tracker reference that this repository's privacy rules keep off
main. A squash keeps them out of the default branch's history only if the description is replaced too: this repository's squash dialog pre-fills the description with every branch commit message. Use the pull request title as the commit title and the summary below as the description (or leave it empty). The published branch is not rewritten (no force push).The same merge from the command line (it sets both fields, so nothing is pre-filled); the pin-bump revision updates the summary:
Screens
The native SDKs draw every Bank and Location screen, including the location permission request and its denied states, and the retry-limit screen. Their JVM screenshot tests (light, dark, Spanish) live with the native SDK. The wrapper draws nothing of its own, so there is no wrapper screen to capture. The visual proof below is the design's iOS permission frame, whose prompt body is the string this example app declares.
Validation
mapErrorTypewas read against the sdk-ios 4.9.1 binaries it resolves. Those are the four Swift Package Manager zips, whose SHA-256 matches the checksums in sdk-iosPackage.swift, andDiditSDK-CocoaPods.zip, which the podspec downloads. In every variant (All, Core, AutoDetection, NFC),VerificationErrordeclares exactlysessionExpired,retryBlocked,networkError,cameraAccessDeniedandunknown(String). The plugin maps each case by name;@unknown defaultonly guards cases added by later native releases.openssl verify -purpose sslserverand meet iOS's rules for TLS server certificates (RSA 2048, SHA-256, DNS subject alternative name, server-auth extended key usage, 2-day validity). Over TLS with only that authority trusted, the session request answers 200 with the retry-blocked session on IPv4 and IPv6, any other path answers 404, a client that does not trust the authority is refused, and the refusal is logged without stopping the server. The response has every field the native SDK's session model requires, and the native SDK's retry-blocked check (can_retry == falseand statusDeclined) matches it.retryBlockedcase, this test receivesVerificationErrorType.unknownand fails.** TEST SUCCEEDED **../gradlew :didit_sdk:testDebugUnitTest,BUILD SUCCESSFULin run 37717798127).example/ios/Podfile.lock's checksum line, so no Dart, Kotlin or Swift source changes. CI reran the iOS bridge test, the XCTests and the Android tests above on it (run 37717798127), and all four jobs passed.Visual proof
Bank and Location steps in the Flutter wrapper
The wrapper draws no Bank or Location screen: the native SDKs draw both. This change adds no UI code. Its Kotlin and Swift changes are plugin unit tests, the helpers they reach, and the iOS mapping of the native
retryBlockederror. The only text it controls that a person sees is the body of the iOS location permission prompt. The example app declares it in English (Info.plist) and Spanish (es.lproj/InfoPlist.strings).These are the design's iOS permission frame for the Location step, the spec those strings follow. In each frame the prompt body is byte-identical to the string committed in the example app. iOS writes the title line itself from the app's name; only the body comes from the app.
Nothing visible changed in this revision. It changes no file in the repository; it only records a new check of the native releases in the pull request description. The prompt strings above are unchanged and still match the example app byte for byte.
Not captured here. This Linux sandbox has no Xcode and no Android emulator, so there is no device capture through the wrapper yet. A device capture needs a Mac or an Android device, plus a native SDK release that includes the steps. The native
retryBlockedcallback reaching Dart is proven by the iOS bridge test on a CI simulator (see Validation in the pull request).🤖 Generated with Claude Code