'CodeSacnner library of cn1 works in Android but crashed in ios without any error message
I use the CodeScanner library of cn1 for QR code scan. This library installs Barcode Scanner + simple for the scanning process and works in Android. I also build my project for ios. But my program crashes in my iPhone 7 max without any error message when trying to scan QRCode. The library doesn't install any 3rd party for the scanning process in iOS.
CodeScanner.getInstance().scanQRCode(new ScanResult() {
public void scanCompleted(String contents, String formatName, byte[] rawBytes) {
}
public void scanCanceled() {
}
public void scanError(int errorCode, String message) {
}
});
Solution 1:[1]
Try adding the build hint: ios.NSCameraUsageDescription with description of why you need to use the camera.
This should have been added automatically by the simulator and should have been documented. I suggest opening an issue on that here.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Shai Almog |
