diff --git a/ios/LayoutReanimation/REAAnimationsManager.m b/ios/LayoutReanimation/REAAnimationsManager.m index 585c6aa3c00f..d992dc0426c2 100644 --- a/ios/LayoutReanimation/REAAnimationsManager.m +++ b/ios/LayoutReanimation/REAAnimationsManager.m @@ -1,7 +1,7 @@ #import #import #import -#import +#import #import #import #import @@ -30,7 +30,7 @@ BOOL REANodeFind(id view, int (^block)(id)) @implementation REAAnimationsManager { RCTUIManager *_uiManager; - REAUIManager *_reaUiManager; + REASwizzledUIManager *_reaSwizzledUIManager; NSMutableSet *_enteringViews; NSMutableDictionary *_enteringViewTargetValues; NSMutableDictionary *_exitingViews; @@ -59,7 +59,6 @@ - (instancetype)initWithUIManager:(RCTUIManager *)uiManager { if (self = [super init]) { _uiManager = uiManager; - _reaUiManager = (REAUIManager *)uiManager; _exitingViews = [NSMutableDictionary new]; _exitingSubviewsCountMap = [NSMutableDictionary new]; _ancestorsToRemove = [NSMutableSet new]; @@ -74,6 +73,7 @@ - (instancetype)initWithUIManager:(RCTUIManager *)uiManager [_currentKeys addObject:[NSString stringWithFormat:@"current%@", [key capitalizedString]]]; } _sharedTransitionManager = [[REASharedTransitionManager alloc] initWithAnimationsManager:self]; + _reaSwizzledUIManager = [[REASwizzledUIManager alloc] initWithUIManager:uiManager withAnimationManager:self]; } return self; } @@ -106,7 +106,7 @@ - (void)setAnimationRemovingBlock:(REAAnimationRemovingBlock)clearAnimation - (UIView *)viewForTag:(NSNumber *)tag { UIView *view; - (view = [_reaUiManager viewForReactTag:tag]) || (view = [_exitingViews objectForKey:tag]) || + (view = [_uiManager viewForReactTag:tag]) || (view = [_exitingViews objectForKey:tag]) || (view = [_sharedTransitionManager getTransitioningView:tag]); return view; } diff --git a/ios/LayoutReanimation/REASwizzledUIManager.h b/ios/LayoutReanimation/REASwizzledUIManager.h new file mode 100644 index 000000000000..515edd6847c8 --- /dev/null +++ b/ios/LayoutReanimation/REASwizzledUIManager.h @@ -0,0 +1,6 @@ +#import + +@interface REASwizzledUIManager : NSObject +- (instancetype)initWithUIManager:(RCTUIManager *)uiManager + withAnimationManager:(REAAnimationsManager *)animationsManager; +@end diff --git a/ios/LayoutReanimation/REAUIManager.mm b/ios/LayoutReanimation/REASwizzledUIManager.mm similarity index 59% rename from ios/LayoutReanimation/REAUIManager.mm rename to ios/LayoutReanimation/REASwizzledUIManager.mm index 7e9dd06660ea..ded2eb7fd43a 100644 --- a/ios/LayoutReanimation/REAUIManager.mm +++ b/ios/LayoutReanimation/REASwizzledUIManager.mm @@ -1,91 +1,91 @@ -#import #import -#import -#import -#import -#import +#import #import #import -#import #import #import -#import - -#if __has_include() -#import -#endif - -@interface RCTUIManager (REA) -- (void)_manageChildren:(NSNumber *)containerTag - moveFromIndices:(NSArray *)moveFromIndices - moveToIndices:(NSArray *)moveToIndices - addChildReactTags:(NSArray *)addChildReactTags - addAtIndices:(NSArray *)addAtIndices - removeAtIndices:(NSArray *)removeAtIndices - registry:(NSMutableDictionary> *)registry; - -- (RCTViewManagerUIBlock)uiBlockWithLayoutUpdateForRootView:(RCTRootShadowView *)rootShadowView; +#import +#import +@interface RCTUIManager (Reanimated) +@property REAAnimationsManager *animationsManager; - (NSArray> *)_childrenToRemoveFromContainer:(id)container atIndices:(NSArray *)atIndices; @end -@implementation REAUIManager { - NSMutableDictionary> *> *_toBeRemovedRegister; - NSMutableDictionary *_parentMapper; - REAAnimationsManager *_animationsManager; - std::weak_ptr _scheduler; +@implementation RCTUIManager (Reanimated) +@dynamic animationsManager; +- (void)setAnimationsManager:(REAAnimationsManager *)animationsManager +{ + objc_setAssociatedObject(self, @selector(animationsManager), animationsManager, OBJC_ASSOCIATION_RETAIN); } +- (id)animationsManager +{ + return objc_getAssociatedObject(self, @selector(animationsManager)); +} +@end -+ (NSString *)moduleName +@implementation REASwizzledUIManager + +- (instancetype)initWithUIManager:(RCTUIManager *)uiManager + withAnimationManager:(REAAnimationsManager *)animationsManager { - return NSStringFromClass([RCTUIManager class]); + if (self = [super init]) { + [uiManager setAnimationsManager:animationsManager]; + [self swizzleMethods]; + } + return self; } -- (void)invalidate +- (void)swizzleMethods { - [_animationsManager invalidate]; - [super invalidate]; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + [self swizzleMethod:@selector(uiBlockWithLayoutUpdateForRootView:) + forClass:[RCTUIManager class] + with:@selector(reanimated_uiBlockWithLayoutUpdateForRootView:) + fromClass:[self class]]; + SEL manageChildrenOriginal = @selector + (_manageChildren:moveFromIndices:moveToIndices:addChildReactTags:addAtIndices:removeAtIndices:registry:); + SEL manageChildrenReanimated = + @selector(reanimated_manageChildren: + moveFromIndices:moveToIndices:addChildReactTags:addAtIndices:removeAtIndices:registry:); + [self swizzleMethod:manageChildrenOriginal + forClass:[RCTUIManager class] + with:manageChildrenReanimated + fromClass:[self class]]; + }); } -- (void)setBridge:(RCTBridge *)bridge +- (void)swizzleMethod:(SEL)originalSelector + forClass:(Class)originalClass + with:(SEL)newSelector + fromClass:(Class)newClass { - if (!_blockSetter) { - _blockSetter = true; - - self.bridge = bridge; - [super setValue:bridge forKey:@"_bridge"]; - [self setValue:[bridge.uiManager valueForKey:@"_shadowViewRegistry"] forKey:@"_shadowViewRegistry"]; - [self setValue:[bridge.uiManager valueForKey:@"_viewRegistry"] forKey:@"_viewRegistry"]; - [self setValue:[bridge.uiManager valueForKey:@"_nativeIDRegistry"] forKey:@"_nativeIDRegistry"]; - [self setValue:[bridge.uiManager valueForKey:@"_shadowViewsWithUpdatedProps"] - forKey:@"_shadowViewsWithUpdatedProps"]; - [self setValue:[bridge.uiManager valueForKey:@"_shadowViewsWithUpdatedChildren"] - forKey:@"_shadowViewsWithUpdatedChildren"]; - [self setValue:[bridge.uiManager valueForKey:@"_pendingUIBlocks"] forKey:@"_pendingUIBlocks"]; - [self setValue:[bridge.uiManager valueForKey:@"_rootViewTags"] forKey:@"_rootViewTags"]; - [self setValue:[bridge.uiManager valueForKey:@"_observerCoordinator"] forKey:@"_observerCoordinator"]; - [self setValue:[bridge.uiManager valueForKey:@"_componentDataByName"] forKey:@"_componentDataByName"]; - - _blockSetter = false; - } + Method originalMethod = class_getInstanceMethod(originalClass, originalSelector); + Method newMethod = class_getInstanceMethod(newClass, newSelector); + IMP originalImplementation = method_getImplementation(originalMethod); + IMP newImplementation = method_getImplementation(newMethod); + class_replaceMethod(originalClass, newSelector, originalImplementation, method_getTypeEncoding(originalMethod)); + class_replaceMethod(originalClass, originalSelector, newImplementation, method_getTypeEncoding(newMethod)); } -- (void)_manageChildren:(NSNumber *)containerTag - moveFromIndices:(NSArray *)moveFromIndices - moveToIndices:(NSArray *)moveToIndices - addChildReactTags:(NSArray *)addChildReactTags - addAtIndices:(NSArray *)addAtIndices - removeAtIndices:(NSArray *)removeAtIndices - registry:(NSMutableDictionary> *)registry +- (void)reanimated_manageChildren:(NSNumber *)containerTag + moveFromIndices:(NSArray *)moveFromIndices + moveToIndices:(NSArray *)moveToIndices + addChildReactTags:(NSArray *)addChildReactTags + addAtIndices:(NSArray *)addAtIndices + removeAtIndices:(NSArray *)removeAtIndices + registry:(NSMutableDictionary> *)registry { bool isLayoutAnimationEnabled = reanimated::FeaturesConfig::isLayoutAnimationEnabled(); id container; NSArray> *permanentlyRemovedChildren; BOOL containerIsRootOfViewController = NO; + RCTUIManager *originalSelf = (RCTUIManager *)self; if (isLayoutAnimationEnabled) { container = registry[containerTag]; - permanentlyRemovedChildren = [self _childrenToRemoveFromContainer:container atIndices:removeAtIndices]; + permanentlyRemovedChildren = [originalSelf _childrenToRemoveFromContainer:container atIndices:removeAtIndices]; if ([container isKindOfClass:[UIView class]]) { UIViewController *controller = ((UIView *)container).reactViewController; @@ -97,22 +97,23 @@ - (void)_manageChildren:(NSNumber *)containerTag // of some view controller. In that case, we skip running exiting animations // in its children, to prevent issues with RN Screens. if (containerIsRootOfViewController) { - NSArray> *permanentlyRemovedChildren = [self _childrenToRemoveFromContainer:container - atIndices:removeAtIndices]; + NSArray> *permanentlyRemovedChildren = + [originalSelf _childrenToRemoveFromContainer:container atIndices:removeAtIndices]; for (UIView *view in permanentlyRemovedChildren) { - [_animationsManager endAnimationsRecursive:view]; + [originalSelf.animationsManager endAnimationsRecursive:view]; } - [_animationsManager removeAnimationsFromSubtree:(UIView *)container]; + [originalSelf.animationsManager removeAnimationsFromSubtree:(UIView *)container]; } } - [super _manageChildren:containerTag - moveFromIndices:moveFromIndices - moveToIndices:moveToIndices - addChildReactTags:addChildReactTags - addAtIndices:addAtIndices - removeAtIndices:removeAtIndices - registry:registry]; + // call original method + [self reanimated_manageChildren:containerTag + moveFromIndices:moveFromIndices + moveToIndices:moveToIndices + addChildReactTags:addChildReactTags + addAtIndices:addAtIndices + removeAtIndices:removeAtIndices + registry:registry]; if (!isLayoutAnimationEnabled) { return; @@ -132,27 +133,18 @@ - (void)_manageChildren:(NSNumber *)containerTag return [(NSNumber *)obj1[0] compare:(NSNumber *)obj2[0]]; }]; - [_animationsManager reattachAnimatedChildren:permanentlyRemovedChildren - toContainer:container - atIndices:removeAtIndices]; -} - -- (void)callAnimationForTree:(UIView *)view parentTag:(NSNumber *)parentTag -{ - _parentMapper[view.reactTag] = parentTag; - - for (UIView *subView in view.reactSubviews) { - [self callAnimationForTree:subView parentTag:view.reactTag]; - } + [originalSelf.animationsManager reattachAnimatedChildren:permanentlyRemovedChildren + toContainer:container + atIndices:removeAtIndices]; } -// Overrided https://github.com/facebook/react-native/blob/v0.65.0/React/Modules/RCTUIManager.m#L530 -- (RCTViewManagerUIBlock)uiBlockWithLayoutUpdateForRootView:(RCTRootShadowView *)rootShadowView +- (RCTViewManagerUIBlock)reanimated_uiBlockWithLayoutUpdateForRootView:(RCTRootShadowView *)rootShadowView { if (!reanimated::FeaturesConfig::isLayoutAnimationEnabled()) { - return [super uiBlockWithLayoutUpdateForRootView:rootShadowView]; + return [self reanimated_uiBlockWithLayoutUpdateForRootView:rootShadowView]; } + RCTUIManager *originalSelf = (RCTUIManager *)self; NSHashTable *affectedShadowViews = [NSHashTable weakObjectsHashTable]; [rootShadowView layoutWithAffectedShadowViews:affectedShadowViews]; @@ -266,7 +258,8 @@ - (RCTViewManagerUIBlock)uiBlockWithLayoutUpdateForRootView:(RCTRootShadowView * } // Reanimated changes /start - REASnapshot *snapshotBefore = isNew ? nil : [self->_animationsManager prepareSnapshotBeforeMountForView:view]; + REASnapshot *snapshotBefore = + isNew ? nil : [originalSelf.animationsManager prepareSnapshotBeforeMountForView:view]; snapshotsBefore[reactTag] = snapshotBefore; // Reanimated changes /end @@ -327,7 +320,7 @@ - (RCTViewManagerUIBlock)uiBlockWithLayoutUpdateForRootView:(RCTRootShadowView * REASnapshot *snapshotBefore = snapshotsBefore[reactTag]; if (isNew || snapshotBefore != nil) { - [self->_animationsManager viewDidMount:view withBeforeSnapshot:snapshotBefore withNewFrame:frame]; + [originalSelf.animationsManager viewDidMount:view withBeforeSnapshot:snapshotBefore withNewFrame:frame]; } } @@ -336,52 +329,9 @@ - (RCTViewManagerUIBlock)uiBlockWithLayoutUpdateForRootView:(RCTRootShadowView * // private field [uiManager setNextLayoutAnimationGroup:nil]; - [self->_animationsManager viewsDidLayout]; + [originalSelf.animationsManager viewsDidLayout]; // Reanimated changes /end }; } -- (Class)class -{ - return [RCTUIManager class]; -} - -+ (Class)class -{ - return [RCTUIManager class]; -} - -- (void)setUp:(REAAnimationsManager *)animationsManager -{ - _animationsManager = animationsManager; - _toBeRemovedRegister = [[NSMutableDictionary> *> alloc] init]; - _parentMapper = [[NSMutableDictionary alloc] init]; -} - -- (void)unregisterView:(id)view -{ - NSNumber *tag = _parentMapper[view.reactTag]; - if (tag == nil) { - return; - } - - [_toBeRemovedRegister[tag] removeObject:view]; - if (_toBeRemovedRegister[tag].count == 0) { - [_toBeRemovedRegister removeObjectForKey:tag]; - } - NSMutableDictionary> *viewRegistry = [self valueForKey:@"_viewRegistry"]; - [view.reactSuperview removeReactSubview:view]; - id parentView = viewRegistry[tag]; - @try { - [parentView removeReactSubview:view]; - } @catch (id anException) { - } -#if __has_include() - if ([view isKindOfClass:[RNSScreenView class]]) { - [parentView didUpdateReactSubviews]; - } -#endif - [viewRegistry removeObjectForKey:view.reactTag]; -} - @end diff --git a/ios/LayoutReanimation/REAUIManager.h b/ios/LayoutReanimation/REAUIManager.h deleted file mode 100644 index 1bf3cfdcc06b..000000000000 --- a/ios/LayoutReanimation/REAUIManager.h +++ /dev/null @@ -1,16 +0,0 @@ -#import -#import -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface REAUIManager : RCTUIManager -@property BOOL blockSetter; -- (void)setBridge:(RCTBridge *)bridge; -- (void)setUp:(REAAnimationsManager *)animationsManager; -- (void)unregisterView:(id)view; -@property (nonatomic, copy) void (^flushUiOperations)(); -@end - -NS_ASSUME_NONNULL_END diff --git a/ios/REAModule.h b/ios/REAModule.h index 64db48b4a767..eabe0b4dea22 100644 --- a/ios/REAModule.h +++ b/ios/REAModule.h @@ -5,11 +5,13 @@ #import #import +#import #import @interface REAModule : RCTEventEmitter @property (nonatomic, readonly) REANodesManager *nodesManager; +@property REAAnimationsManager *animationsManager; #ifdef RCT_NEW_ARCH_ENABLED - (void)installReanimatedAfterReload; diff --git a/ios/REAModule.mm b/ios/REAModule.mm index a9a0ecd3d89a..84c187c6e72b 100644 --- a/ios/REAModule.mm +++ b/ios/REAModule.mm @@ -195,6 +195,7 @@ - (void)setBridge:(RCTBridge *)bridge _operations = [NSMutableArray new]; [bridge.uiManager.observerCoordinator addObserver:self]; + _animationsManager = [[REAAnimationsManager alloc] initWithUIManager:bridge.uiManager]; } #pragma mark-- Batch handling diff --git a/ios/REAUtils.h b/ios/REAUtils.h deleted file mode 100644 index 05a78f2ef09b..000000000000 --- a/ios/REAUtils.h +++ /dev/null @@ -1,7 +0,0 @@ -#import - -#define REA_LOG_ERROR_IF_NIL(value, errorMsg) \ - ({ \ - if (value == nil) \ - RCTLogError(errorMsg); \ - }) diff --git a/ios/native/NativeProxy.mm b/ios/native/NativeProxy.mm index 17f3380ff9e6..c5acc30fe544 100644 --- a/ios/native/NativeProxy.mm +++ b/ios/native/NativeProxy.mm @@ -9,7 +9,7 @@ #import #import #import -#import +#import #import #import #import @@ -182,18 +182,7 @@ static CFTimeInterval calculateTimestampWithSlowAnimations(CFTimeInterval curren #else // Layout Animations start __block std::weak_ptr weakScheduler = scheduler; - ((REAUIManager *)uiManager).flushUiOperations = ^void() { - std::shared_ptr scheduler = weakScheduler.lock(); - if (scheduler != nullptr) { - scheduler->triggerUI(); - } - }; - - REAUIManager *reaUiManagerNoCast = [bridge moduleForClass:[REAUIManager class]]; - RCTUIManager *reaUiManager = reaUiManagerNoCast; - REAAnimationsManager *animationsManager = [[REAAnimationsManager alloc] initWithUIManager:reaUiManager]; - [reaUiManagerNoCast setUp:animationsManager]; - + REAAnimationsManager *animationsManager = reaModule.animationsManager; __weak REAAnimationsManager *weakAnimationsManager = animationsManager; std::weak_ptr wrt = animatedRuntime; diff --git a/ios/native/RCTAppDelegate+Reanimated.h b/ios/native/RCTAppDelegate+Reanimated.h deleted file mode 100644 index 1886195564f1..000000000000 --- a/ios/native/RCTAppDelegate+Reanimated.h +++ /dev/null @@ -1,25 +0,0 @@ -#if REACT_NATIVE_MINOR_VERSION >= 72 && !defined(RCT_NEW_ARCH_ENABLED) && !defined(DONT_AUTOINSTALL_REANIMATED) - -#import - -#if __has_include() -#import -#elif __has_include() -// for importing the header from framework, the dash will be transformed to underscore -#import -#endif - -#if __has_include() -#import -#elif __has_include() -// for importing the header from framework, "React-cxxreact" will be omitted -#import -#endif - -@interface RCTAppDelegate (Reanimated) - -- (std::unique_ptr)reanimated_jsExecutorFactoryForBridge:(RCTBridge *)bridge; - -@end - -#endif diff --git a/ios/native/RCTAppDelegate+Reanimated.mm b/ios/native/RCTAppDelegate+Reanimated.mm deleted file mode 100644 index 7647df5d8421..000000000000 --- a/ios/native/RCTAppDelegate+Reanimated.mm +++ /dev/null @@ -1,28 +0,0 @@ -#if REACT_NATIVE_MINOR_VERSION >= 72 && !defined(RCT_NEW_ARCH_ENABLED) && !defined(DONT_AUTOINSTALL_REANIMATED) - -#import -#import -#import - -@implementation RCTAppDelegate (Reanimated) - -- (std::unique_ptr)reanimated_jsExecutorFactoryForBridge:(RCTBridge *)bridge -{ - reanimated::REAInitializer(bridge); - return [self reanimated_jsExecutorFactoryForBridge:bridge]; // call the original method -} - -+ (void)load -{ - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - Class cls = [self class]; - Method originalMethod = class_getInstanceMethod(cls, @selector(jsExecutorFactoryForBridge:)); - Method swizzledMethod = class_getInstanceMethod(cls, @selector(reanimated_jsExecutorFactoryForBridge:)); - method_exchangeImplementations(originalMethod, swizzledMethod); - }); -} - -@end - -#endif diff --git a/ios/native/REAInitializer.h b/ios/native/REAInitializer.h index b3cf5fbffc76..66898e8f4ef3 100644 --- a/ios/native/REAInitializer.h +++ b/ios/native/REAInitializer.h @@ -1,3 +1,9 @@ +/* + Note: Files REAInitializer.h and REAInitializer.m are deprecated and will + be removed in future releases. They are currently kept for backward + compatibility and will be retained for a few upcoming releases. +*/ + #ifndef RCT_NEW_ARCH_ENABLED #import @@ -12,12 +18,13 @@ NS_ASSUME_NONNULL_BEGIN namespace reanimated { -void REAInitializer(RCTBridge *bridge); - #if REACT_NATIVE_MINOR_VERSION <= 71 -JSIExecutor::RuntimeInstaller REAJSIExecutorRuntimeInstaller( - RCTBridge *bridge, - JSIExecutor::RuntimeInstaller runtimeInstallerToWrap); +[[deprecated( + "REAJSIExecutorRuntimeInstaller method is no longer required, you can just remove invocation.")]] JSIExecutor:: + RuntimeInstaller + REAJSIExecutorRuntimeInstaller( + RCTBridge *bridge, + JSIExecutor::RuntimeInstaller runtimeInstallerToWrap); #endif // REACT_NATIVE_MINOR_VERSION <= 71 } // namespace reanimated diff --git a/ios/native/REAInitializer.mm b/ios/native/REAInitializer.mm index fe411753dc74..b2ad7d2b7adb 100644 --- a/ios/native/REAInitializer.mm +++ b/ios/native/REAInitializer.mm @@ -1,27 +1,15 @@ #ifndef RCT_NEW_ARCH_ENABLED #import -#import namespace reanimated { -void REAInitializer(RCTBridge *bridge) -{ - [bridge moduleForClass:[RCTUIManager class]]; - REAUIManager *reaUiManager = [REAUIManager new]; - [reaUiManager setBridge:bridge]; - RCTUIManager *uiManager = reaUiManager; - [bridge updateModuleWithInstance:uiManager]; -} - #if REACT_NATIVE_MINOR_VERSION <= 71 JSIExecutor::RuntimeInstaller REAJSIExecutorRuntimeInstaller( RCTBridge *bridge, JSIExecutor::RuntimeInstaller runtimeInstallerToWrap) { - REAInitializer(bridge); - const auto runtimeInstaller = [runtimeInstallerToWrap](facebook::jsi::Runtime &runtime) { if (runtimeInstallerToWrap) { runtimeInstallerToWrap(runtime); diff --git a/ios/native/UIResponder+Reanimated.h b/ios/native/UIResponder+Reanimated.h deleted file mode 100644 index d245c5a64c23..000000000000 --- a/ios/native/UIResponder+Reanimated.h +++ /dev/null @@ -1,10 +0,0 @@ -#if REACT_NATIVE_MINOR_VERSION <= 71 && !defined(RCT_NEW_ARCH_ENABLED) && !defined(DONT_AUTOINSTALL_REANIMATED) - -#import -#import - -@interface UIResponder (Reanimated) - -@end - -#endif \ No newline at end of file diff --git a/ios/native/UIResponder+Reanimated.mm b/ios/native/UIResponder+Reanimated.mm deleted file mode 100644 index 4ca12f0acf5d..000000000000 --- a/ios/native/UIResponder+Reanimated.mm +++ /dev/null @@ -1,32 +0,0 @@ -#if REACT_NATIVE_MINOR_VERSION <= 71 && !defined(RCT_NEW_ARCH_ENABLED) && !defined(DONT_AUTOINSTALL_REANIMATED) - -#import -#import - -#if __has_include() -#import -typedef HermesExecutorFactory ExecutorFactory; -#elif __has_include() -#import -typedef HermesExecutorFactory ExecutorFactory; -#else -#import -typedef JSCExecutorFactory ExecutorFactory; -#endif - -@implementation UIResponder (Reanimated) -- (std::unique_ptr)jsExecutorFactoryForBridge:(RCTBridge *)bridge -{ - const auto installer = reanimated::REAJSIExecutorRuntimeInstaller(bridge, NULL); - -#if REACT_NATIVE_MINOR_VERSION >= 64 - // installs globals such as console, nativePerformanceNow, etc. - return std::make_unique(RCTJSIExecutorRuntimeInstaller(installer)); -#else - return std::make_unique(installer); -#endif -} - -@end - -#endif