react-native-camera-kit
react-native-camera-kit copied to clipboard
scanBarcode={false} ios not working
Issue Description
Barcode is read even if scanBarcode value is set to false in ios
Steps to Reproduce / Code Snippets / Screenshots
<CameraScreen
showFrame={false}
// Show/hide scan frame
scanBarcode={false}
// Can restrict for the QR Code only
laserColor={'blue'}
// Color can be of your choice
frameColor={'yellow'}
// If frame is visible then frame color
colorForScannerFrame={'black'}
// Scanner Frame color
onReadCode={(event) =>
onBarcodeScan(event.nativeEvent.codeStringValue)
//Alert.alert('QR code found')
}
/>
Environment
- React Native Navigation version: 6.0.11
- React Native version: 0.68.1
- Platform(s) (iOS, Android, or both?): IOS
- Device info (Simulator/Device? OS version? Debug/Release?): device/15.4.1/Debug
I want to block reading the barcode until success or failure is returned after verifying the value after reading the barcode.
Use a hook const local = useRef({ reading: false})
and set local.current.reading = true
in the onReadCode()
handler to block multiple reads from triggering.
Same issue: I know it can be prevented using a ref, but that shouldn't be like that.