react-native-macos 0.0.0-7ae1439d0 → 0.0.0-7c6fa2fb1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/Libraries/Animated/AnimatedEvent.js +23 -4
  2. package/Libraries/Animated/NativeAnimatedHelper.js +1 -1
  3. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +22 -12
  4. package/Libraries/Components/DatePicker/DatePickerIOS.ios.js +3 -6
  5. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +4 -7
  6. package/Libraries/Components/ScrollView/ScrollView.js +8 -5
  7. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +268 -252
  8. package/Libraries/Core/ExceptionsManager.js +3 -1
  9. package/Libraries/Core/ReactNativeVersion.js +1 -1
  10. package/Libraries/Core/setUpBatchedBridge.js +1 -1
  11. package/Libraries/Core/setUpGlobals.js +2 -0
  12. package/Libraries/Core/setUpTimers.js +2 -2
  13. package/Libraries/Image/Image.ios.js +6 -0
  14. package/Libraries/LogBox/UI/LogBoxImages/alert-triangle.png +0 -0
  15. package/Libraries/LogBox/UI/LogBoxImages/chevron-left.png +0 -0
  16. package/Libraries/LogBox/UI/LogBoxImages/chevron-right.png +0 -0
  17. package/Libraries/LogBox/UI/LogBoxImages/close.png +0 -0
  18. package/Libraries/LogBox/UI/LogBoxImages/loader.png +0 -0
  19. package/Libraries/NativeAnimation/Nodes/RCTPropsAnimatedNode.m +0 -3
  20. package/Libraries/NativeAnimation/RCTNativeAnimatedModule.mm +6 -3
  21. package/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.h +1 -2
  22. package/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.mm +2 -1
  23. package/Libraries/NewAppScreen/components/logo.png +0 -0
  24. package/Libraries/Pressability/Pressability.js +1 -0
  25. package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +1 -0
  26. package/Libraries/Renderer/REVISION +1 -1
  27. package/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +238 -47
  28. package/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +84 -18
  29. package/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +84 -18
  30. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +238 -47
  31. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +84 -18
  32. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +84 -18
  33. package/Libraries/StyleSheet/normalizeColor.js +2 -2
  34. package/Libraries/Text/RawText/RCTRawTextShadowView.m +2 -0
  35. package/Libraries/Text/Text/RCTTextView.m +7 -9
  36. package/Libraries/Text/TextInput/Multiline/RCTUITextView.m +10 -8
  37. package/Libraries/Text/TextInput/RCTBaseTextInputView.m +1 -1
  38. package/Libraries/Text/TextProps.js +1 -7
  39. package/Libraries/TurboModule/TurboModuleRegistry.js +1 -1
  40. package/Libraries/Utilities/HMRClient.js +1 -1
  41. package/Libraries/WebSocket/RCTSRWebSocket.m +23 -0
  42. package/React/Base/RCTBridge+Private.h +8 -0
  43. package/React/Base/RCTBridge.h +4 -0
  44. package/React/Base/RCTBridge.m +17 -0
  45. package/React/Base/RCTBridgeModule.h +1 -1
  46. package/React/Base/RCTBundleURLProvider.h +1 -1
  47. package/React/Base/RCTBundleURLProvider.mm +2 -2
  48. package/React/Base/RCTConvert.m +1 -1
  49. package/React/Base/RCTDefines.h +12 -3
  50. package/React/Base/RCTEventDispatcherProtocol.h +2 -0
  51. package/React/Base/RCTImageSource.m +2 -0
  52. package/React/Base/RCTJSStackFrame.m +2 -0
  53. package/React/Base/RCTJavaScriptLoader.mm +2 -0
  54. package/React/Base/RCTKeyCommands.m +2 -0
  55. package/React/Base/RCTModuleData.mm +2 -0
  56. package/React/Base/RCTModuleMethod.mm +2 -0
  57. package/React/Base/RCTRootView.h +15 -0
  58. package/React/Base/RCTRootView.m +15 -0
  59. package/React/Base/RCTTouchEvent.m +2 -0
  60. package/React/Base/RCTVersion.m +1 -1
  61. package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.h +11 -0
  62. package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.mm +35 -1
  63. package/React/CoreModules/RCTActionSheetManager.mm +4 -0
  64. package/React/CoreModules/RCTDevMenu.mm +4 -4
  65. package/React/CoreModules/RCTDevSettings.mm +6 -6
  66. package/React/CoreModules/RCTDevSplitBundleLoader.mm +1 -1
  67. package/React/CoreModules/RCTDeviceInfo.mm +4 -4
  68. package/React/CoreModules/RCTEventDispatcher.mm +5 -0
  69. package/React/CoreModules/RCTPerfMonitor.mm +9 -4
  70. package/React/CxxBridge/RCTCxxBridge.mm +18 -1
  71. package/React/CxxModule/RCTCxxMethod.mm +2 -0
  72. package/React/DevSupport/RCTInspectorDevServerHelper.mm +12 -0
  73. package/React/FBReactNativeSpec/FBReactNativeSpec.podspec +11 -3
  74. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +9 -0
  75. package/React/Fabric/Mounting/RCTMountingManager.mm +15 -1
  76. package/React/Fabric/RCTScheduler.mm +10 -3
  77. package/React/Modules/RCTLayoutAnimation.m +2 -0
  78. package/React/Modules/RCTLayoutAnimationGroup.m +2 -0
  79. package/React/Modules/RCTUIManager.m +19 -10
  80. package/React/Views/RCTFont.mm +58 -47
  81. package/React/Views/RCTShadowView.m +3 -1
  82. package/React/Views/RCTView.m +4 -8
  83. package/React/Views/RCTViewManager.m +3 -2
  84. package/React/Views/SafeAreaView/RCTSafeAreaView.m +2 -0
  85. package/React/Views/ScrollView/MacOS/RCTScrollContentLocalData.h +2 -2
  86. package/React/Views/ScrollView/MacOS/RCTScrollContentLocalData.m +4 -4
  87. package/React/Views/ScrollView/RCTScrollContentView.m +10 -24
  88. package/React/Views/ScrollView/RCTScrollView.m +1 -5
  89. package/ReactAndroid/build.gradle +12 -6
  90. package/ReactAndroid/gradle.properties +1 -1
  91. package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/BUCK +0 -1
  92. package/ReactAndroid/src/androidTest/js/TestBundle.js +0 -7
  93. package/ReactAndroid/src/main/java/com/facebook/react/BUCK +0 -1
  94. package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +51 -21
  95. package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManagerBuilder.java +12 -0
  96. package/ReactAndroid/src/main/java/com/facebook/react/ReactNativeHost.java +6 -0
  97. package/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstance.java +4 -0
  98. package/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstanceImpl.java +4 -0
  99. package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactCxxErrorHandler.java +39 -0
  100. package/ReactAndroid/src/main/java/com/facebook/react/bridge/RuntimeScheduler.java +21 -0
  101. package/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +6 -0
  102. package/ReactAndroid/src/main/java/com/facebook/react/fabric/Binding.java +5 -0
  103. package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricJSIModuleProvider.java +1 -0
  104. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Android.mk +2 -1
  105. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp +14 -0
  106. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.h +2 -0
  107. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.java +9 -1
  108. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java +19 -0
  109. package/ReactAndroid/src/main/java/com/facebook/react/modules/core/{JavaScriptTimerManager.java → JavaScriptTimerExecutor.java} +1 -1
  110. package/ReactAndroid/src/main/java/com/facebook/react/modules/core/JavaTimerManager.java +7 -7
  111. package/ReactAndroid/src/main/java/com/facebook/react/modules/core/TimingModule.java +2 -2
  112. package/ReactAndroid/src/main/java/com/facebook/react/modules/i18nmanager/I18nManagerModule.java +7 -1
  113. package/ReactAndroid/src/main/java/com/facebook/react/modules/intent/IntentModule.java +23 -19
  114. package/ReactAndroid/src/main/java/com/facebook/react/modules/network/ForwardingCookieHandler.java +1 -4
  115. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  116. package/ReactAndroid/src/main/java/com/facebook/react/shell/BUCK +0 -1
  117. package/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java +0 -5
  118. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextAnchorViewManager.java +0 -4
  119. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.java +16 -0
  120. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java +8 -0
  121. package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.java +20 -1
  122. package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java +25 -6
  123. package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManagerMapBuffer.java +25 -5
  124. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditTextInputConnectionWrapper.java +3 -0
  125. package/ReactAndroid/src/main/jni/react/jni/Android.mk +3 -2
  126. package/ReactAndroid/src/main/jni/react/jni/BUCK +2 -0
  127. package/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.cpp +29 -0
  128. package/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.h +4 -0
  129. package/ReactAndroid/src/main/jni/react/jni/JReactCxxErrorHandler.cpp +18 -0
  130. package/ReactAndroid/src/main/jni/react/jni/JReactCxxErrorHandler.h +25 -0
  131. package/ReactAndroid/src/main/jni/react/jni/JRuntimeScheduler.cpp +22 -0
  132. package/ReactAndroid/src/main/jni/react/jni/JRuntimeScheduler.h +30 -0
  133. package/ReactAndroid/src/main/third-party/android/androidx/BUCK +6 -6
  134. package/ReactCommon/React-Fabric.podspec +9 -0
  135. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  136. package/ReactCommon/hermes/inspector/tools/msggen/package.json +7 -4
  137. package/ReactCommon/hermes/inspector/tools/msggen/yarn.lock +1238 -1491
  138. package/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModuleManager.mm +14 -31
  139. package/ReactCommon/react/renderer/animations/BUCK +1 -0
  140. package/ReactCommon/react/renderer/animations/LayoutAnimationCallbackWrapper.h +34 -0
  141. package/ReactCommon/react/renderer/animations/LayoutAnimationDriver.cpp +5 -26
  142. package/ReactCommon/react/renderer/animations/LayoutAnimationDriver.h +3 -13
  143. package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp +1399 -1622
  144. package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.h +76 -244
  145. package/ReactCommon/react/renderer/animations/conversions.h +212 -0
  146. package/ReactCommon/react/renderer/animations/primitives.h +104 -0
  147. package/ReactCommon/react/renderer/animations/utils.cpp +71 -0
  148. package/ReactCommon/react/renderer/animations/utils.h +80 -0
  149. package/ReactCommon/react/renderer/attributedstring/AttributedString.h +0 -1
  150. package/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.cpp +7 -3
  151. package/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.h +12 -2
  152. package/ReactCommon/react/renderer/attributedstring/TextAttributes.h +1 -1
  153. package/ReactCommon/react/renderer/attributedstring/conversions.h +58 -3
  154. package/ReactCommon/react/renderer/attributedstring/primitives.h +18 -1
  155. package/ReactCommon/react/renderer/components/text/ParagraphComponentDescriptor.h +1 -17
  156. package/ReactCommon/react/renderer/components/view/Android.mk +1 -1
  157. package/ReactCommon/react/renderer/components/view/ViewComponentDescriptor.h +0 -23
  158. package/ReactCommon/react/renderer/components/view/ViewPropsInterpolation.h +2 -3
  159. package/ReactCommon/react/renderer/components/view/ViewShadowNode.cpp +1 -0
  160. package/ReactCommon/react/renderer/components/view/ViewShadowNode.h +1 -1
  161. package/ReactCommon/react/renderer/components/view/accessibilityPropsConversions.h +4 -0
  162. package/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h +14 -6
  163. package/ReactCommon/react/renderer/core/ConcreteShadowNode.h +1 -0
  164. package/ReactCommon/react/renderer/core/Props.h +1 -0
  165. package/ReactCommon/react/renderer/core/PropsParserContext.h +3 -2
  166. package/ReactCommon/react/renderer/core/RawPropsKey.cpp +10 -2
  167. package/ReactCommon/react/renderer/core/ReactPrimitives.h +0 -2
  168. package/ReactCommon/react/renderer/core/ShadowNodeFamily.h +1 -0
  169. package/ReactCommon/react/renderer/graphics/Android.mk +1 -1
  170. package/ReactCommon/react/renderer/graphics/Transform.cpp +1 -1
  171. package/ReactCommon/react/renderer/graphics/Transform.h +1 -1
  172. package/ReactCommon/react/renderer/mounting/Android.mk +2 -1
  173. package/ReactCommon/react/renderer/mounting/MountingOverrideDelegate.h +1 -1
  174. package/ReactCommon/react/renderer/mounting/ShadowViewMutation.cpp +12 -0
  175. package/ReactCommon/react/renderer/mounting/ShadowViewMutation.h +10 -1
  176. package/ReactCommon/react/renderer/runtimescheduler/BUCK +0 -1
  177. package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +4 -2
  178. package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h +4 -2
  179. package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerBinding.cpp +4 -3
  180. package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerBinding.h +4 -2
  181. package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerClock.h +4 -2
  182. package/ReactCommon/react/renderer/runtimescheduler/SchedulerPriority.h +4 -3
  183. package/ReactCommon/react/renderer/runtimescheduler/Task.cpp +4 -2
  184. package/ReactCommon/react/renderer/runtimescheduler/Task.h +4 -2
  185. package/ReactCommon/react/renderer/runtimescheduler/primitives.h +4 -2
  186. package/ReactCommon/react/renderer/scheduler/SurfaceHandler.h +4 -4
  187. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.h +2 -0
  188. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm +19 -0
  189. package/ReactCommon/react/renderer/timeline/BUCK +6 -6
  190. package/ReactCommon/react/renderer/uimanager/UIManagerAnimationDelegate.h +1 -1
  191. package/ReactCommon/react/test_utils/BUCK +3 -0
  192. package/ReactCommon/react/test_utils/MockSurfaceHandler.h +25 -0
  193. package/ReactCommon/react/utils/ContextContainer.h +0 -27
  194. package/flow/global.js +45 -0
  195. package/index.js +15 -10
  196. package/package.json +21 -13
  197. package/react.gradle +1 -1
  198. package/scripts/generate-specs-cli.js +18 -0
  199. package/scripts/ios-configure-glog.sh +4 -0
  200. package/scripts/react_native_pods.rb +156 -37
  201. package/template/_flowconfig +1 -1
  202. package/template/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  203. package/template/package.json +2 -2
  204. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.android.js +0 -87
  205. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.ios.js +0 -30
  206. package/Libraries/Components/DatePickerAndroid/DatePickerAndroidTypes.js +0 -30
  207. package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/DatePickerDialogTestCase.java +0 -172
  208. package/ReactAndroid/src/androidTest/js/DatePickerDialogTestModule.js +0 -45
  209. package/ReactAndroid/src/main/java/com/facebook/react/modules/datepicker/BUCK +0 -27
  210. package/ReactAndroid/src/main/java/com/facebook/react/modules/datepicker/DatePickerDialogFragment.java +0 -137
  211. package/ReactAndroid/src/main/java/com/facebook/react/modules/datepicker/DatePickerDialogModule.java +0 -153
  212. package/ReactAndroid/src/main/java/com/facebook/react/modules/datepicker/DatePickerMode.java +0 -15
  213. package/ReactAndroid/src/main/java/com/facebook/react/modules/datepicker/DismissableDatePickerDialog.java +0 -117
  214. package/ReactAndroid/src/main/java/com/facebook/react/runtimescheduler/BUCK +0 -20
  215. package/ReactAndroid/src/main/java/com/facebook/react/runtimescheduler/RuntimeSchedulerManager.java +0 -39
  216. package/ReactAndroid/src/main/java/com/facebook/react/runtimescheduler/jni/Android.mk +0 -34
  217. package/ReactAndroid/src/main/java/com/facebook/react/runtimescheduler/jni/BUCK +0 -35
  218. package/ReactAndroid/src/main/java/com/facebook/react/runtimescheduler/jni/OnLoad.cpp +0 -15
  219. package/ReactAndroid/src/main/java/com/facebook/react/runtimescheduler/jni/RuntimeSchedulerManager.cpp +0 -46
  220. package/ReactAndroid/src/main/java/com/facebook/react/runtimescheduler/jni/RuntimeSchedulerManager.h +0 -40
  221. package/scripts/generate-specs.sh +0 -99
  222. package/template/_editorconfig +0 -3
  223. package/template/_gitattributes +0 -3
@@ -21,7 +21,7 @@ NSString *const kRCTPlatformName = @"ios";
21
21
  NSString *const kRCTPlatformName = @"macos";
22
22
  #endif // ]TODO(macOS GH#774)
23
23
 
24
- #if RCT_DEV_MENU
24
+ #if RCT_DEV_MENU | RCT_PACKAGER_LOADING_FUNCTIONALITY
25
25
  static BOOL kRCTAllowPackagerAccess = YES;
26
26
  void RCTBundleURLProviderAllowPackagerServerAccess(BOOL allowed)
27
27
  {
@@ -156,7 +156,7 @@ static NSURL *serverRootWithHostPort(NSString *hostPort, NSString *scheme)
156
156
 
157
157
  - (NSString *)packagerServerHostPort
158
158
  {
159
- #if RCT_DEV_MENU
159
+ #if RCT_DEV_MENU | RCT_PACKAGER_LOADING_FUNCTIONALITY
160
160
  if (!kRCTAllowPackagerAccess) {
161
161
  RCTLogInfo(@"Packager server access is disabled in this environment");
162
162
  return nil;
@@ -1423,7 +1423,7 @@ RCT_ENUM_CONVERTER(
1423
1423
  @"link": NSAccessibilityLinkRole, // also a legacy iOS accessibilityTraits
1424
1424
  @"menu": NSAccessibilityMenuRole,
1425
1425
  @"menubar": NSAccessibilityMenuBarRole,
1426
- @"menuitem": NSAccessibilityMenuBarItemRole,
1426
+ @"menuitem": NSAccessibilityMenuItemRole,
1427
1427
  @"none": NSAccessibilityUnknownRole,
1428
1428
  @"progressbar": NSAccessibilityProgressIndicatorRole,
1429
1429
  @"radio": NSAccessibilityRadioButtonRole,
@@ -54,6 +54,15 @@
54
54
  #define RCT_DEV_MENU RCT_DEV
55
55
  #endif
56
56
 
57
+ /**
58
+ * Controls for the core packgaer loading functionality
59
+ * By default, this inherits from RCT_DEV_MENU but it also gives the capability to
60
+ * enable the packager functionality without the rest of the dev tools from RCT_DEV_MENU
61
+ */
62
+ #ifndef RCT_ENABLE_LOADING_FROM_PACKAGER
63
+ #define RCT_ENABLE_LOADING_FROM_PACKAGER RCT_DEV_MENU
64
+ #endif
65
+
57
66
  #ifndef RCT_ENABLE_INSPECTOR
58
67
  #if RCT_DEV && __has_include(<React/RCTInspectorDevServerHelper.h>)
59
68
  #define RCT_ENABLE_INSPECTOR 1
@@ -62,11 +71,11 @@
62
71
  #endif
63
72
  #endif
64
73
 
65
- #ifndef ENABLE_PACKAGER_CONNECTION
74
+ #ifndef RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION
66
75
  #if RCT_DEV && (__has_include("RCTPackagerConnection.h") || __has_include(<React/RCTPackagerConnection.h>))
67
- #define ENABLE_PACKAGER_CONNECTION 1
76
+ #define RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION 1
68
77
  #else
69
- #define ENABLE_PACKAGER_CONNECTION 0
78
+ #define RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION 0
70
79
  #endif
71
80
  #endif
72
81
 
@@ -81,6 +81,8 @@ typedef NS_ENUM(NSInteger, RCTTextEventType) {
81
81
  */
82
82
  @protocol RCTEventDispatcherProtocol <RCTBridgeModule, RCTJSDispatcherModule>
83
83
 
84
+ - (void)sendViewEventWithName:(NSString *)name reactTag:(NSNumber *)reactTag;
85
+
84
86
  /**
85
87
  * Deprecated, do not use.
86
88
  */
@@ -42,6 +42,7 @@
42
42
  (CGSizeEqualToSize(_size, object.size) || CGSizeEqualToSize(object.size, CGSizeZero));
43
43
  }
44
44
 
45
+ #if DEBUG // TODO(macOS GH#774) description is a debug-only feature
45
46
  - (NSString *)description
46
47
  {
47
48
  return [NSString stringWithFormat:@"<RCTImageSource: %p URL=%@, size=%@, scale=%0.f>",
@@ -50,6 +51,7 @@
50
51
  NSStringFromCGSize(_size),
51
52
  _scale];
52
53
  }
54
+ #endif // TODO(macOS GH#774)
53
55
 
54
56
  @end
55
57
 
@@ -136,6 +136,7 @@ static NSRegularExpression *RCTJSStackFrameRegex()
136
136
  return stack;
137
137
  }
138
138
 
139
+ #if DEBUG // TODO(macOS GH#774) description is a debug-only feature
139
140
  - (NSString *)description
140
141
  {
141
142
  return [NSString stringWithFormat:@"<%@: %p method name: %@; file name: %@; line: %ld; column: %ld>",
@@ -146,5 +147,6 @@ static NSRegularExpression *RCTJSStackFrameRegex()
146
147
  (long)self.lineNumber,
147
148
  (long)self.column];
148
149
  }
150
+ #endif // TODO(macOS GH#774)
149
151
 
150
152
  @end
@@ -62,6 +62,7 @@ static RCTSource *RCTSourceCreate(NSURL *url, NSData *data, int64_t length) NS_R
62
62
 
63
63
  @implementation RCTLoadingProgress
64
64
 
65
+ #if DEBUG // TODO(macOS GH#774) description is a debug-only feature
65
66
  - (NSString *)description
66
67
  {
67
68
  NSMutableString *desc = [NSMutableString new];
@@ -77,6 +78,7 @@ static RCTSource *RCTSourceCreate(NSURL *url, NSData *data, int64_t length) NS_R
77
78
  [desc appendString:@"\u2026"];
78
79
  return desc;
79
80
  }
81
+ #endif // TODO(macOS GH#774)
80
82
 
81
83
  @end
82
84
 
@@ -74,6 +74,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)init)
74
74
  return [_key isEqual:input] && (_flags == flags || flags == 0);
75
75
  }
76
76
 
77
+ #if DEBUG // TODO(macOS GH#774) description is a debug-only feature
77
78
  - (NSString *)description
78
79
  {
79
80
  return [NSString stringWithFormat:@"<%@:%p input=\"%@\" flags=%lld hasBlock=%@>",
@@ -83,6 +84,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)init)
83
84
  (long long)_flags,
84
85
  _block ? @"YES" : @"NO"];
85
86
  }
87
+ #endif // TODO(macOS GH#774)
86
88
 
87
89
  @end
88
90
 
@@ -570,9 +570,11 @@ RCT_NOT_IMPLEMENTED(-(instancetype)init);
570
570
  _methodQueue = nil;
571
571
  }
572
572
 
573
+ #if DEBUG // TODO(macOS GH#774) description is a debug-only feature
573
574
  - (NSString *)description
574
575
  {
575
576
  return [NSString stringWithFormat:@"<%@: %p; name=\"%@\">", [self class], self, self.name];
576
577
  }
578
+ #endif // TODO(macOS GH#774)
577
579
 
578
580
  @end
@@ -602,6 +602,7 @@ RCT_EXTERN_C_END
602
602
  return [NSString stringWithFormat:@"-[%@ %s]", _moduleClass, sel_getName(_selector)];
603
603
  }
604
604
 
605
+ #if DEBUG // TODO(macOS GH#774) description is a debug-only feature
605
606
  - (NSString *)description
606
607
  {
607
608
  return [NSString stringWithFormat:@"<%@: %p; exports %@ as %s(); type: %s>",
@@ -611,5 +612,6 @@ RCT_EXTERN_C_END
611
612
  self.JSMethodName,
612
613
  RCTFunctionDescriptorFromType(self.functionType)];
613
614
  }
615
+ #endif // TODO(macOS GH#774)
614
616
 
615
617
  @end
@@ -8,6 +8,8 @@
8
8
  #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTBridge.h>
11
+ #import <React/RCTBridgeModule.h>
12
+ #import <React/RCTEventDispatcherProtocol.h>
11
13
 
12
14
  @protocol RCTRootViewDelegate;
13
15
 
@@ -75,6 +77,19 @@ extern
75
77
  initialProperties:(nullable NSDictionary *)initialProperties
76
78
  launchOptions:(nullable NSDictionary *)launchOptions;
77
79
 
80
+ /**
81
+ * This API allows RCTRootView users to know if the root view is backed by the bridge.
82
+ */
83
+ @property (nonatomic, readonly) BOOL hasBridge;
84
+
85
+ /**
86
+ * This API allows users of RCTRootView to access other NativeModules, without
87
+ * directly accessing the bridge.
88
+ */
89
+ @property (nonatomic, strong, readonly) RCTModuleRegistry *moduleRegistry;
90
+
91
+ @property (nonatomic, strong, readonly) id<RCTEventDispatcherProtocol> eventDispatcher;
92
+
78
93
  /**
79
94
  * The name of the JavaScript module to execute within the
80
95
  * specified scriptURL (required). Setting this will not have
@@ -136,6 +136,21 @@ NSString *const RCTContentDidAppearNotification = @"RCTContentDidAppearNotificat
136
136
  RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame)
137
137
  RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : (NSCoder *)aDecoder)
138
138
 
139
+ - (BOOL)hasBridge
140
+ {
141
+ return _bridge != nil;
142
+ }
143
+
144
+ - (RCTModuleRegistry *)moduleRegistry
145
+ {
146
+ return _bridge.moduleRegistry;
147
+ }
148
+
149
+ - (id<RCTEventDispatcherProtocol>)eventDispatcher
150
+ {
151
+ return [self.moduleRegistry moduleForName:"EventDispatcher"];
152
+ }
153
+
139
154
  #pragma mark - passThroughTouches
140
155
 
141
156
  - (BOOL)passThroughTouches
@@ -98,10 +98,12 @@ RCT_NOT_IMPLEMENTED(-(instancetype)init)
98
98
  return _coalescingKey;
99
99
  }
100
100
 
101
+ #if DEBUG // TODO(macOS GH#774) description is a debug-only feature
101
102
  - (NSString *)description
102
103
  {
103
104
  return [NSString
104
105
  stringWithFormat:@"<%@: %p; name = %@; coalescing key = %hu>", [self class], self, _eventName, _coalescingKey];
105
106
  }
107
+ #endif // TODO(macOS GH#774)
106
108
 
107
109
  @end
@@ -28,7 +28,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
28
28
  RCTVersionMajor: @(0),
29
29
  RCTVersionMinor: @(0),
30
30
  RCTVersionPatch: @(0),
31
- RCTVersionPrerelease: @"7ae1439d0",
31
+ RCTVersionPrerelease: @"7c6fa2fb1",
32
32
  };
33
33
  });
34
34
  return __rnVersion;
@@ -7,6 +7,7 @@
7
7
 
8
8
  #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
+ #import <React/RCTBridgeModule.h>
10
11
  #import <React/RCTRootView.h>
11
12
 
12
13
  #import "RCTSurfaceHostingView.h"
@@ -26,6 +27,9 @@ NS_ASSUME_NONNULL_BEGIN
26
27
 
27
28
  @property (nonatomic, copy, readonly) NSString *moduleName;
28
29
  @property (nonatomic, strong, readonly) RCTBridge *bridge;
30
+ @property (nonatomic, readonly) BOOL hasBridge;
31
+ @property (nonatomic, strong, readonly) RCTModuleRegistry *moduleRegistry;
32
+ @property (nonatomic, strong, readonly) id<RCTEventDispatcherProtocol> eventDispatcher;
29
33
  @property (nonatomic, copy, readwrite) NSDictionary *appProperties;
30
34
  @property (nonatomic, assign) RCTRootViewSizeFlexibility sizeFlexibility;
31
35
  @property (nonatomic, weak) id<RCTRootViewDelegate> delegate;
@@ -46,6 +50,13 @@ NS_ASSUME_NONNULL_BEGIN
46
50
  initialProperties:(NSDictionary *)initialProperties
47
51
  launchOptions:(NSDictionary *)launchOptions;
48
52
 
53
+ /**
54
+ * Bridgeless mode initializer
55
+ */
56
+ - (instancetype)initWithSurface:(id<RCTSurfaceProtocol>)surface
57
+ sizeMeasureMode:(RCTSurfaceSizeMeasureMode)sizeMeasureMode
58
+ moduleRegistry:(RCTModuleRegistry *)moduleRegistry;
59
+
49
60
  - (void)cancelTouches;
50
61
 
51
62
  @end
@@ -10,6 +10,7 @@
10
10
  #import <objc/runtime.h>
11
11
 
12
12
  #import "RCTAssert.h"
13
+ #import "RCTBridge+Private.h"
13
14
  #import "RCTBridge.h"
14
15
  #import "RCTLog.h"
15
16
  #import "RCTPerformanceLogger.h"
@@ -48,7 +49,9 @@ static RCTRootViewSizeFlexibility convertToRootViewSizeFlexibility(RCTSurfaceSiz
48
49
  }
49
50
  }
50
51
 
51
- @implementation RCTSurfaceHostingProxyRootView
52
+ @implementation RCTSurfaceHostingProxyRootView {
53
+ RCTModuleRegistry *_moduleRegistry;
54
+ }
52
55
 
53
56
  - (instancetype)initWithBridge:(RCTBridge *)bridge
54
57
  moduleName:(NSString *)moduleName
@@ -94,6 +97,37 @@ static RCTRootViewSizeFlexibility convertToRootViewSizeFlexibility(RCTSurfaceSiz
94
97
  return [self initWithBridge:bridge moduleName:moduleName initialProperties:initialProperties];
95
98
  }
96
99
 
100
+ - (instancetype)initWithSurface:(id<RCTSurfaceProtocol>)surface
101
+ sizeMeasureMode:(RCTSurfaceSizeMeasureMode)sizeMeasureMode
102
+ moduleRegistry:(RCTModuleRegistry *)moduleRegistry
103
+ {
104
+ if (self = [super initWithSurface:surface sizeMeasureMode:sizeMeasureMode]) {
105
+ _moduleRegistry = moduleRegistry;
106
+ }
107
+
108
+ return self;
109
+ }
110
+
111
+ - (BOOL)hasBridge
112
+ {
113
+ return _bridge != nil;
114
+ }
115
+
116
+ - (RCTModuleRegistry *)moduleRegistry
117
+ {
118
+ // In bridgeless mode, RCTSurfaceHostingProxyRootView is created with an RCTModuleRegistry
119
+ if (_moduleRegistry) {
120
+ return _moduleRegistry;
121
+ }
122
+
123
+ return _bridge.moduleRegistry;
124
+ }
125
+
126
+ - (id<RCTEventDispatcherProtocol>)eventDispatcher
127
+ {
128
+ return [self.moduleRegistry moduleForName:"EventDispatcher"];
129
+ }
130
+
97
131
  RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame)
98
132
  RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : (NSCoder *)aDecoder)
99
133
 
@@ -43,7 +43,11 @@ NSSharingServicePickerDelegate
43
43
 
44
44
  RCT_EXPORT_MODULE()
45
45
 
46
+ #if TARGET_OS_OSX // [TODO(macOS GH#774)
47
+ @synthesize bridge = _bridge;
48
+ #else // TODO(macOS GH#774)
46
49
  @synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED;
50
+ #endif // ]TODO(macOS GH#774)
47
51
 
48
52
  - (dispatch_queue_t)methodQueue
49
53
  {
@@ -297,10 +297,10 @@ RCT_EXPORT_MODULE()
297
297
  addObject:[RCTDevMenuItem
298
298
  buttonItemWithTitle:@"Debugger Unavailable"
299
299
  handler:^{
300
- #if !TARGET_OS_OSX // TODO(macOS GH#774)
301
300
  NSString *message = RCTTurboModuleEnabled()
302
301
  ? @"Debugging with Chrome is not supported when TurboModules are enabled."
303
302
  : @"Include the RCTWebSocket library to enable JavaScript debugging.";
303
+ #if !TARGET_OS_OSX // TODO(macOS GH#774)
304
304
  UIAlertController *alertController =
305
305
  [UIAlertController alertControllerWithTitle:@"Debugger Unavailable"
306
306
  message:message
@@ -319,10 +319,10 @@ RCT_EXPORT_MODULE()
319
319
  completion:NULL];
320
320
  #else // [TODO(macOS GH#774)
321
321
  NSAlert *alert = [[NSAlert alloc] init];
322
- [alert setMessageText:@"Remote JS Debugger Unavailable"];
323
- [alert setInformativeText:@"You need to include the RCTWebSocket library to enable remote JS debugging"];
322
+ [alert setMessageText:@"Debugger Unavailable"];
323
+ [alert setInformativeText:message];
324
324
  [alert addButtonWithTitle:@"OK"];
325
- [alert setAlertStyle:NSWarningAlertStyle];
325
+ [alert setAlertStyle:NSAlertStyleWarning];
326
326
  [alert beginSheetModalForWindow:[NSApp keyWindow] completionHandler:nil];
327
327
  #endif // ]TODO(macOS GH#774)
328
328
  }]];
@@ -35,7 +35,7 @@ static NSString *const kRCTDevSettingSecondClickToShowDevMenu = @"secondClickToS
35
35
 
36
36
  static NSString *const kRCTDevSettingsUserDefaultsKey = @"RCTDevMenu";
37
37
 
38
- #if ENABLE_PACKAGER_CONNECTION
38
+ #if RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION
39
39
  #import <React/RCTPackagerClient.h>
40
40
  #import <React/RCTPackagerConnection.h>
41
41
  #endif
@@ -128,14 +128,14 @@ void RCTDevSettingsSetEnabled(BOOL enabled)
128
128
 
129
129
  @end
130
130
 
131
- #if ENABLE_PACKAGER_CONNECTION
131
+ #if RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION
132
132
  static RCTHandlerToken reloadToken;
133
133
  static std::atomic<int> numInitializedModules{0};
134
134
  #endif
135
135
 
136
136
  @interface RCTDevSettings () <RCTBridgeModule, RCTInvalidating, NativeDevSettingsSpec, RCTDevSettingsInspectable> {
137
137
  BOOL _isJSLoaded;
138
- #if ENABLE_PACKAGER_CONNECTION
138
+ #if RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION
139
139
  RCTHandlerToken _bridgeExecutorOverrideToken;
140
140
  #endif
141
141
  }
@@ -192,7 +192,7 @@ RCT_EXPORT_MODULE()
192
192
 
193
193
  - (void)initialize
194
194
  {
195
- #if DEBUG && ENABLE_PACKAGER_CONNECTION // TODO(OSS Candidate ISS#2710739)
195
+ #if DEBUG && RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION // TODO(OSS Candidate ISS#2710739)
196
196
  if (self.bridge) {
197
197
  RCTBridge *__weak weakBridge = self.bridge;
198
198
  _bridgeExecutorOverrideToken = [[RCTPackagerConnection sharedPackagerConnection]
@@ -245,7 +245,7 @@ RCT_EXPORT_MODULE()
245
245
  - (void)invalidate
246
246
  {
247
247
  [super invalidate];
248
- #if ENABLE_PACKAGER_CONNECTION
248
+ #if RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION
249
249
  if (self.bridge) {
250
250
  [[RCTPackagerConnection sharedPackagerConnection] removeHandler:_bridgeExecutorOverrideToken];
251
251
  }
@@ -470,7 +470,7 @@ RCT_EXPORT_METHOD(addMenuItem : (NSString *)title)
470
470
 
471
471
  - (void)addHandler:(id<RCTPackagerClientMethod>)handler forPackagerMethod:(NSString *)name
472
472
  {
473
- #if ENABLE_PACKAGER_CONNECTION
473
+ #if RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION
474
474
  [[RCTPackagerConnection sharedPackagerConnection] addHandler:handler forMethod:name];
475
475
  #endif
476
476
  }
@@ -22,7 +22,7 @@ using namespace facebook::react;
22
22
  @interface RCTDevSplitBundleLoader () <NativeDevSplitBundleLoaderSpec>
23
23
  @end
24
24
 
25
- #if RCT_DEV_MENU
25
+ #if RCT_DEV_MENU | RCT_PACKAGER_LOADING_FUNCTIONALITY
26
26
 
27
27
  @implementation RCTDevSplitBundleLoader
28
28
 
@@ -12,6 +12,7 @@
12
12
  #import <React/RCTAssert.h>
13
13
  #import <React/RCTConstants.h>
14
14
  #import <React/RCTEventDispatcherProtocol.h>
15
+ #import <React/RCTInitializing.h>
15
16
  #import <React/RCTUIKit.h> // TODO(macOS GH#774)
16
17
  #import <React/RCTUIUtils.h>
17
18
  #import <React/RCTUtils.h>
@@ -21,7 +22,7 @@
21
22
 
22
23
  using namespace facebook::react;
23
24
 
24
- @interface RCTDeviceInfo () <NativeDeviceInfoSpec>
25
+ @interface RCTDeviceInfo () <NativeDeviceInfoSpec, RCTInitializing>
25
26
  @end
26
27
 
27
28
  @implementation RCTDeviceInfo {
@@ -45,14 +46,13 @@ RCT_EXPORT_MODULE()
45
46
  return dispatch_get_main_queue();
46
47
  }
47
48
 
48
- - (void)setModuleRegistry:(RCTModuleRegistry *)moduleRegistry
49
+ - (void)initialize
49
50
  {
50
- _moduleRegistry = moduleRegistry;
51
51
  #if !TARGET_OS_OSX // TODO(macOS GH#774)
52
52
  [[NSNotificationCenter defaultCenter] addObserver:self
53
53
  selector:@selector(didReceiveNewContentSizeMultiplier)
54
54
  name:RCTAccessibilityManagerDidUpdateMultiplierNotification
55
- object:[moduleRegistry moduleForName:"AccessibilityManager"]];
55
+ object:[_moduleRegistry moduleForName:"AccessibilityManager"]];
56
56
 
57
57
  _currentInterfaceOrientation = [RCTSharedApplication() statusBarOrientation];
58
58
 
@@ -56,6 +56,11 @@ RCT_EXPORT_MODULE()
56
56
  _observersLock = [NSLock new];
57
57
  }
58
58
 
59
+ - (void)sendViewEventWithName:(NSString *)name reactTag:(NSNumber *)reactTag
60
+ {
61
+ [_callableJSModules invokeModule:@"RCTViewEventEmitter" method:@"emit" withArgs:@[ name, RCTNullIfNil(reactTag) ]];
62
+ }
63
+
59
64
  - (void)sendAppEventWithName:(NSString *)name body:(id)body
60
65
  {
61
66
  [_callableJSModules invokeModule:@"RCTNativeAppEventEmitter"
@@ -20,6 +20,7 @@
20
20
  #import <React/RCTBridge+Private.h>
21
21
  #import <React/RCTBridge.h>
22
22
  #import <React/RCTFPSGraph.h>
23
+ #import <React/RCTInitializing.h>
23
24
  #import <React/RCTInvalidating.h>
24
25
  #import <React/RCTJavaScriptExecutor.h>
25
26
  #import <React/RCTPerformanceLogger.h>
@@ -84,8 +85,13 @@ static vm_size_t RCTGetResidentMemorySize(void)
84
85
  return memoryUsageInByte;
85
86
  }
86
87
 
87
- @interface RCTPerfMonitor
88
- : NSObject <RCTBridgeModule, RCTTurboModule, RCTInvalidating, UITableViewDataSource, UITableViewDelegate>
88
+ @interface RCTPerfMonitor : NSObject <
89
+ RCTBridgeModule,
90
+ RCTTurboModule,
91
+ RCTInitializing,
92
+ RCTInvalidating,
93
+ UITableViewDataSource,
94
+ UITableViewDelegate>
89
95
 
90
96
  #if __has_include(<React/RCTDevMenu.h>)
91
97
  @property (nonatomic, strong, readonly) RCTDevMenuItem *devMenuItem;
@@ -150,9 +156,8 @@ RCT_EXPORT_MODULE()
150
156
  return dispatch_get_main_queue();
151
157
  }
152
158
 
153
- - (void)setModuleRegistry:(RCTModuleRegistry *)moduleRegistry
159
+ - (void)initialize
154
160
  {
155
- _moduleRegistry = moduleRegistry;
156
161
  #if __has_include(<React/RCTDevMenu.h>)
157
162
  [(RCTDevMenu *)[_moduleRegistry moduleForName:"DevMenu"] addItem:self.devMenuItem];
158
163
  #endif
@@ -245,6 +245,11 @@ struct RCTInstanceCallback : public InstanceCallback {
245
245
  @synthesize performanceLogger = _performanceLogger;
246
246
  @synthesize valid = _valid;
247
247
 
248
+ - (RCTModuleRegistry *)moduleRegistry
249
+ {
250
+ return _objCModuleRegistry;
251
+ }
252
+
248
253
  - (void)setRCTTurboModuleRegistry:(id<RCTTurboModuleRegistry>)turboModuleRegistry
249
254
  {
250
255
  _turboModuleRegistry = turboModuleRegistry;
@@ -287,6 +292,18 @@ struct RCTInstanceCallback : public InstanceCallback {
287
292
  if ([bridgeModule respondsToSelector:@selector(setCallableJSModules:)]) {
288
293
  bridgeModule.callableJSModules = _callableJSModules;
289
294
  }
295
+
296
+ /**
297
+ * Attach the RCTModuleRegistry to this TurboModule, which allows this TurboModule
298
+ * to require other TurboModules/NativeModules.
299
+ *
300
+ * Usage: In the TurboModule @implementation, include:
301
+ * `@synthesize moduleRegistry = _moduleRegistry`
302
+ */
303
+
304
+ if ([bridgeModule respondsToSelector:@selector(setModuleRegistry:)]) {
305
+ bridgeModule.moduleRegistry = _objCModuleRegistry;
306
+ }
290
307
  }
291
308
 
292
309
  - (std::shared_ptr<MessageQueueThread>)jsMessageThread
@@ -1129,7 +1146,7 @@ struct RCTInstanceCallback : public InstanceCallback {
1129
1146
  [self.devSettings setupHMRClientWithBundleURL:self.bundleURL];
1130
1147
  }
1131
1148
 
1132
- #if RCT_DEV_MENU
1149
+ #if RCT_DEV_MENU | RCT_PACKAGER_LOADING_FUNCTIONALITY
1133
1150
  - (void)loadAndExecuteSplitBundleURL:(NSURL *)bundleURL
1134
1151
  onError:(RCTLoadAndExecuteErrorBlock)onError
1135
1152
  onComplete:(dispatch_block_t)onComplete
@@ -131,9 +131,11 @@ using namespace facebook::react;
131
131
  }
132
132
  }
133
133
 
134
+ #if DEBUG // TODO(macOS GH#774) description is a debug-only feature
134
135
  - (NSString *)description
135
136
  {
136
137
  return [NSString stringWithFormat:@"<%@: %p; name = %s>", [self class], self, self.JSMethodName];
137
138
  }
139
+ #endif // TODO(macOS GH#774)
138
140
 
139
141
  @end
@@ -110,9 +110,21 @@ static void sendEventToAllConnections(NSString *event)
110
110
  }
111
111
 
112
112
  NSString *key = [inspectorURL absoluteString];
113
+ // [TODO(macOS GH#774) - safety check to avoid a crash
114
+ if (key == nil) {
115
+ RCTLogError(@"failed to get inspector URL");
116
+ return nil;
117
+ }
118
+ // ]TODO(macOS GH#774)
113
119
  RCTInspectorPackagerConnection *connection = socketConnections[key];
114
120
  if (!connection || !connection.isConnected) {
115
121
  connection = [[RCTInspectorPackagerConnection alloc] initWithURL:inspectorURL];
122
+ // [TODO(macOS GH#774) - safety check to avoid a crash
123
+ if (connection == nil) {
124
+ RCTLogError(@"failed to initialize RCTInspectorPackagerConnection");
125
+ return nil;
126
+ }
127
+ // ]TODO(macOS GH#774)
116
128
  socketConnections[key] = connection;
117
129
  [connection connect];
118
130
  }
@@ -4,7 +4,9 @@
4
4
  # LICENSE file in the root directory of this source tree.
5
5
 
6
6
  require "json"
7
- require_relative "../../scripts/react_native_pods.rb"
7
+
8
+ react_native_path = "../.."
9
+ require_relative "#{react_native_path}/scripts/react_native_pods.rb"
8
10
 
9
11
  package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
10
12
  version = package['version']
@@ -31,7 +33,7 @@ Pod::Spec.new do |s|
31
33
  s.platforms = { :ios => "11.0", :osx => "10.15" } # TODO(macOS GH#774)
32
34
  s.compiler_flags = folly_compiler_flags + ' -Wno-nullability-completeness'
33
35
  s.source = source
34
- s.source_files = "**/*.{c,h,m,mm,cpp}"
36
+ s.source_files = "**/FBReactNativeSpec*.{h,mm}"
35
37
  s.header_dir = "FBReactNativeSpec"
36
38
 
37
39
  s.pod_target_xcconfig = {
@@ -47,5 +49,11 @@ Pod::Spec.new do |s|
47
49
  s.dependency "React-jsi", version
48
50
  s.dependency "ReactCommon/turbomodule/core", version
49
51
 
50
- use_react_native_codegen! (s)
52
+ use_react_native_codegen!(s, {
53
+ :react_native_path => react_native_path,
54
+ :js_srcs_dir => "#{react_native_path}/Libraries",
55
+ :library_name => "FBReactNativeSpec",
56
+ :library_type => "modules",
57
+ :output_dir => "#{react_native_path}/React/FBReactNativeSpec/FBReactNativeSpec"
58
+ })
51
59
  end
@@ -133,6 +133,15 @@ static void RCTSendPaperScrollEvent_DEPRECATED(UIScrollView *scrollView, NSInteg
133
133
  [self.scrollViewDelegateSplitter removeAllDelegates];
134
134
  }
135
135
 
136
+ - (void)layoutSubviews
137
+ {
138
+ [super layoutSubviews];
139
+
140
+ if (_subviewClippingEnabled) {
141
+ [self _remountChildren];
142
+ }
143
+ }
144
+
136
145
  - (RCTGenericDelegateSplitter<id<UIScrollViewDelegate>> *)scrollViewDelegateSplitter
137
146
  {
138
147
  return ((RCTEnhancedScrollView *)_scrollView).delegateSplitter;