kamera_testing 1.0.0-beta1
kamera_testing: ^1.0.0-beta1 copied to clipboard
Replay test kit for kamera. A thin controller that drives the native KameraReplay facade over a control MethodChannel for E2E tests. Pixels never cross the bridge — only fixture ids and the machine-re [...]
Changelog #
The single changelog for kamera. All four packages — Android
(com.usesmileid:kamera + -mlkit / -huawei), iOS (Kamera.xcframework),
Flutter (kamera), and React Native (@smileid/kamera) — are
versioned and released in lockstep: every release publishes all four at the
same version, no matter which platform the change touched. There are no
per-package changelogs; record every user-facing change here under ## Unreleased.
The version is driven by the root VERSION file (bump with
scripts/set-version.sh x.y.z); a CI gate keeps every package pinned to it.
Format: Keep a Changelog · Versioning: Semantic Versioning.
Unreleased #
Added #
- iOS: kamera is now consumable through Swift Package Manager, from the public
smileidentity/kamera-spmdistribution repo —.package(url: "https://github.com/smileidentity/kamera-spm", exact: "<version>"), withKamera,KameraVisionandKameraTestingas separate products. Previously the xcframeworks were only attached to this repo's releases, so every consumer hand-vendored the zips. Both the manifest and its releases are produced bykamera-ios/Scripts/publish_spm.sh, mirroring how the v12 iOS SDK publishes toios-spm: production versions land onmain, pre-releases onsnapshot. The GitHub releases on this repo are unchanged, so existing consumers keep working.
Changed #
-
Publishing is now one workflow per platform —
publish-android.yaml,publish-ios.yaml,publish-flutter.yaml,publish-expo.yaml— the way each Smile ID SDK repo owns its ownpublish.yaml.release.ymlandsnapshot.ymlare gone; republishing one platform no longer reruns the other three. Android and iOS each take achannelinput (release or snapshot); Flutter and Expo are release-only, as they already were.Order matters and nothing enforces it: run
publish-iosfirst (it cuts the GitHub Release), thenpublish-android, then the wrappers — they vendor the xcframeworks from that release by version and wait on Maven Central. The old single workflow cut the tag last, only once every platform had published, so this trades that atomicity for independence. -
Flutter (
kamera) and React Native (@smileid/kamera) wrapper snapshots are no longer published to pub.dev / npm fromsnapshot.yml; the v12 Flutter/RN SDKs consume the wrappers directly from a branch of this repo (kamera-flutter/,kamera-react-native/). Android (-SNAPSHOTon Maven Central) and iOS (prerelease xcframework Release) snapshots are unchanged. Registry publishing is blocked — Flutter's0.1.0-SNAPSHOT.Nis semver-below the published stablekamera0.1.0, and the CI npm token lacks publish rights for@smileid/kamera. -
Published packages now hide their implementation (design 27): the Android AAR ships with
com.usesmileid.kamera.internal.*obfuscated by R8 (public API kept); the iOS xcframework is built with local symbols stripped and no dSYM bundled; and the React Native package publishes a minifieddist/bundle instead of raw source (the codegen spec files stay readable, as RN codegen requires). dSYMs are never shipped in any package.
Fixed #
-
Android:
KameraSession.release()is now terminal — astart()issued after it is a no-op. Release already shut the analysis executor down, so a restarted session could never serve frames, but it did re-register the thermal status listener. That listener is a binder stub the system holds as a JNI global root, and the matching unregister only runs insiderelease(), so a start arriving after release left one nothing would ever remove — pinning the session and, through itslifecycleOwner, the host that constructed it. Hosts that tear the camera down while a start is still in flight saw a leaked activity per capture screen. -
React Native (
@smileid/kamera) on Android: the preview no longer renders black. The view manager attached the session to a preview view only atcreateViewInstance, but React mounts the view while rendering the tree — normally before JS callsstart()— so on the common ordering there was no session to attach and nothing to attach it later. The same gap broke the second flow on a screen that survives arelease()/start()cycle: the view stayed bound to the released session. Every mounted preview view is now tracked (weakly, so a dropped view cannot leak its activity) and attached whenever a session becomes current, so mount-before-start, start-before-mount, and repeated sessions all end with a live preview. -
React Native (
@smileid/kamera): the generated TurboModule spec now lands in the packageKameraModuleimports.codegenConfig.android.javaPackageNamewas only honoured by the Gradle plugin, not by the CLI behindnpm run codegen:android— which has no such flag — so the two codegen paths emittedNativeKameraSpecinto different packages and a consumer build failed withUnresolved reference 'NativeKameraSpec'. Dropping the override puts both on React Native's defaultcom.facebook.fbreact.specs, which is what the committed tree and the import already used. -
React Native (
@smileid/kamera): a consuming app on the new architecture can now configure CMake. The Android glue declarescodegenConfig, so autolinking always emitsadd_subdirectory(<lib>/android/build/generated/source/codegen/jni)and linksreact_codegen_KameraSpec— but nothing generated that directory, because the glue applied onlycom.android.library. Every native Android build failed at configure with "not an existing directory", then "Cannot specify link libraries for target react_codegen_KameraSpec which is not built by this project". The glue now appliescom.facebook.reactwhen it is on the classpath, so the spec is generated against the consumer's own React Native version. The node-free standalone glue build is unaffected — the plugin is absent there and the committed codegen still serves it. -
Flutter (
kamera_testing): an app using the replay kit alongsidekameracan now resolve its Swift packages. Both packages declared a binary target namedKamera, and SPM requires target names to be unique across the whole package graph, so resolution failed outright with "multiple packages ('kamera', 'kamera_testing') declare targets with a conflicting name: 'Kamera'". The test kit no longer declares one: its glue needs noKamerasymbol (KameraReplayandFixtureRegistryareKameraTesting's own API), andKameraTesting's link-time dependency resolves against the copykameravends.fetch_xcframeworks.shfor the test kit now needs onlyKameraTesting. -
The published Flutter (
kamera) and React Native (@smileid/kamera) wrappers now resolve their native-SNAPSHOTdependency from the Maven Central snapshots repo. In-SNAPSHOTmode the Android glue injected onlymavenLocal()into the host build, so an external consumer of the published wrapper tried to resolvecom.usesmileid:kamera:<x.y.z-SNAPSHOT>from an empty~/.m2and the build failed; the snapshots repo (wheresnapshot.ymlpublishes the artifacts) is now injected alongsidemavenLocal.
0.1.0 #
- Initial pre-release of the kamera camera SDK, published in lockstep across Android, iOS, Flutter, and React Native.