Open bdrelling opened 8 years ago
Could you provide me more information?
EXC_BREAKPOINT
can appear in production Swift code if something is unexpectedly nil
. I'm guessing this happened because context
was nil
(in the current version of RSBarcodes_Swift, it's safely unwrapped)
Safely unwrapped but when the context is nil, this function is returning nil .. :/
The same happens to me from iOS 17.1.2.
// Barcode generation for client card
func generateBarcode(
using barcodeString: String?,
size: CGSize
) -> UIImage? {
guard
let barcodeString,
// Only ean13 check
barcodeString.count == 13,
let image = RSUnifiedCodeGenerator.shared.generateCode(
barcodeString,
machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue
)
else {
return nil
}
return RSAbstractCodeGenerator.resizeImage(image, targetSize: size, contentMode: .scaleToFill)
}
We're getting some crashes in our live app.