IOS Camera barcode scanner

I am trying to use the bar code scanner and have been having some issues on ios. If I hard close the app while the camera is open next time I open the app and go back to the camera I will get a black screen or the app will crash. After trying to open a few more times it will start working again. The issue doesn’t happen when running the app through Expo but it does happen when running through Testflight. I am using SDK 31

Here is what my code looks like (isFocused is coming from withNavigationFocus)

return showScanner && hasCameraPermission && isFocused ? (<Camera onBarCodeScanned={this._handleBarCodeScanned}

barCodeTypes: [BarCodeScanner.Constants.BarCodeType.qr]
flashMode={torchLit ? “torch” : “off”}>
) : …

Removing the barCodeTypes property fixed my issue

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.