Skip to content

Commit

Permalink
Merge pull request #34 from tfcornerstone/patch-1
Browse files Browse the repository at this point in the history
fix(iOS): crash in react native vision camera v4 for iOS
  • Loading branch information
mgcrea authored May 13, 2024
2 parents c487a44 + 4bb493e commit d3d529e
Showing 1 changed file with 2 additions and 3 deletions.
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

0 comments on commit d3d529e

Please sign in to comment.