fix(eid-wallet): bump barcode-scanner to 2.4.5 to fix iOS cancel crash#977
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes the constant iOS crash when the QR/barcode scanner is closed or cancelled.
Root cause: in tauri-plugin-barcode-scanner 2.4.4 the native cancel() handler calls destroy() -> dismantleCamera() -> cameraView.removeFromSuperview() directly on Tauri's background dispatch queue. That is a UIKit call off the main thread, so iOS aborts with SIGABRT (NSAssertionHandler). scan() and the other handlers already wrap their UIKit work in DispatchQueue.main.async; cancel() in 2.4.4 did not. Android is unaffected (no equivalent main-thread assertion).
Fix: upstream 2.4.5 wraps the whole cancel() body in DispatchQueue.main.async (tauri-apps/plugins-workspace#3393). Verified against the 2.4.5 source. Cargo.toml already allows it (= "2"), so this is a lockfile-only bump 2.4.4 -> 2.4.5. The iOS Swift is compiled from the vendored crate, so no Cargo.toml or JS change is needed.
Requires an iOS rebuild and a new TestFlight build to ship.