Hello everyone,
I'm encountering an issue with the QR code scanner in this iOS KMM code. It successfully scans the QR code and outputs the data. However, if I wait longer than 5-8 seconds, it stops scanning the code, failing to trigger the output data.
Edited : Refrenced code https://gist.github.com/Alex009/6b150b5027a04f9d4d1cf2072b713793#file-qrscannerscreen-ios-kt
Any help will be appreciated🫡
plus1 1
a
Alexander Zhirkevich
03/15/2024, 6:35 AM
It happens because your metadataObjectDelegate doesn’t have reference from kotlin and getting garbage collected. You should always keep a reference on such staff as delegates in kotlin before passing it to the native objects