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

RuntimeScheduler is only used by TurboModule Manager in >RN0.72 #2461

Merged
merged 4 commits into from
Jun 16, 2023
Merged
Changes from 3 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
12 changes: 12 additions & 0 deletions packages/react-native-host/cocoa/RNXTurboModuleAdapter.mm
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,21 @@
#else
#import <React-RCTAppDelegate/RCTAppSetupUtils.h>
#import <React/RCTSurfacePresenterBridgeAdapter.h>

// We still get into this path because react-native-macos 0.71 picked up some
// 0.72 bits. AFAICT, `RCTLegacyInteropComponents.h` is a new addition in 0.72
// in both react-native and react-native-macos.
#if __has_include(<React-RCTAppDelegate/RCTLegacyInteropComponents.h>)
#import <react/renderer/runtimescheduler/RuntimeScheduler.h>
#import <react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.h>
#if __has_include(<React/RCTRuntimeExecutorFromBridge.h>)
#import <React/RCTRuntimeExecutorFromBridge.h>
#endif // __has_include(<React/RCTRuntimeExecutorFromBridge.h>)
#define USE_RUNTIME_SCHEDULER 1
#else
#define USE_RUNTIME_SCHEDULER 0
#endif // __has_include(<React-RCTAppDelegate/RCTLegacyInteropComponents.h>)

#endif // __has_include(<React/RCTAppSetupUtils.h>)

#endif // USE_TURBOMODULE
Expand Down