diff --git a/.changeset/loud-walls-fail.md b/.changeset/loud-walls-fail.md new file mode 100644 index 000000000..659d7ff6c --- /dev/null +++ b/.changeset/loud-walls-fail.md @@ -0,0 +1,5 @@ +--- +"@rnx-kit/react-native-host": patch +--- + +RuntimeScheduler is only used by TurboModule Manager in >RN0.72 diff --git a/packages/react-native-host/cocoa/RNXTurboModuleAdapter.mm b/packages/react-native-host/cocoa/RNXTurboModuleAdapter.mm index 1fcb2d7b6..1cd4b5e43 100644 --- a/packages/react-native-host/cocoa/RNXTurboModuleAdapter.mm +++ b/packages/react-native-host/cocoa/RNXTurboModuleAdapter.mm @@ -16,9 +16,21 @@ #else #import #import + +// 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() #import #import +#if __has_include() +#import +#endif // __has_include() #define USE_RUNTIME_SCHEDULER 1 +#else +#define USE_RUNTIME_SCHEDULER 0 +#endif // __has_include() + #endif // __has_include() #endif // USE_TURBOMODULE