Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash in react native vision camera v4 for iOS #34

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions ios/CodeScannerProcessorPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ - (id)callback:(Frame*)frame withArguments:(NSDictionary*)arguments {
RCTLogInfo(@"Processing frame with width: %lu, height: %lu and arguments: %@", width, height, arguments);

// Parse the barcode types to be detected
NSDictionary* barcodeTypes = arguments[@"barcodeTypes"];
NSArray* barcodeTypes = arguments[@"barcodeTypes"];
NSMutableArray* symbologies = [NSMutableArray new];
for (NSString* key in barcodeTypes) {
NSString* barcodeType = [barcodeTypes objectForKey:key];
for (NSString* barcodeType in barcodeTypes) {
VNBarcodeSymbology symbology = [self barcodeSymbologyFromString:barcodeType];
if (symbology != nil) {
[symbologies addObject:symbology];
Expand Down
Loading