feat: Make Reanimated optional (disable Frame Processors if REA v2 is not installed) (#412)
* Fix building iOS without Reanimated * Conditionally compile Frame Processors (gradle) * Conditionally use externalNativeBuild * Remove Reanimated import * fix: Conditionally load REA/VisionCamera libraries * fix: Add disable FP to docs * fix: Fix dummy placeholder for Scheduler.mm * fix: Fix dummy `Scheduler` declaration * fix: Only init `CameraView` C++ side if frame processors are enabled * fix: Install JSI Bindings on Frame Processor Manager ctor * fix: Wrong conditional * whoops
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#import <RNReanimated/RuntimeManager.h>
|
||||
#import <RNReanimated/RuntimeDecorator.h>
|
||||
#import <RNReanimated/REAIOSErrorHandler.h>
|
||||
#import "VisionCameraScheduler.h"
|
||||
#define ENABLE_FRAME_PROCESSORS
|
||||
#else
|
||||
#warning Your react-native-reanimated version is not compatible with VisionCamera, Frame Processors are disabled. Make sure you're using reanimated 2.2.0 or above!
|
||||
@@ -36,7 +37,6 @@
|
||||
|
||||
#import "FrameProcessorUtils.h"
|
||||
#import "FrameProcessorCallback.h"
|
||||
#import "VisionCameraScheduler.h"
|
||||
#import "../React Utils/MakeJSIRuntime.h"
|
||||
#import "../React Utils/JSIUtils.h"
|
||||
|
||||
@@ -153,7 +153,7 @@ __attribute__((objc_runtime_name("_TtC12VisionCamera10CameraView")))
|
||||
|
||||
dispatch_async(CameraQueues.frameProcessorQueue, [=]() {
|
||||
NSLog(@"FrameProcessorBindings: Converting worklet to Objective-C callback...");
|
||||
|
||||
|
||||
auto& rt = *runtimeManager->runtime;
|
||||
auto function = worklet->getValue(rt).asObject(rt).asFunction(rt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user