From 8be34e9ea3257aca2cedcd78c89cd79788e62a9a Mon Sep 17 00:00:00 2001 From: ismaelsousa Date: Sun, 25 Feb 2024 13:17:30 -0300 Subject: [PATCH] Refactor OCRFrameProcessorPlugin initialization --- ios/VisionCameraOcr.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ios/VisionCameraOcr.m b/ios/VisionCameraOcr.m index d922d2a..f3654db 100644 --- a/ios/VisionCameraOcr.m +++ b/ios/VisionCameraOcr.m @@ -11,8 +11,9 @@ @implementation OCRFrameProcessorPlugin (FrameProcessorPluginLoader) + (void)load { - [FrameProcessorPluginRegistry addFrameProcessorPlugin:@"scanOCR" withInitializer:^FrameProcessorPlugin * _Nonnull(NSDictionary * _Nullable options) { - return [[OCRFrameProcessorPlugin alloc] initWithOptions:options]; + // vision @3.9.0 + [FrameProcessorPluginRegistry addFrameProcessorPlugin:@"scanOCR" withInitializer:^FrameProcessorPlugin * _Nonnull(VisionCameraProxyHolder * _Nonnull proxy, NSDictionary * _Nullable options) { + return [[OCRFrameProcessorPlugin alloc] initWithProxy:proxy withOptions:options]; }]; }