react-native 0.74.2 → 0.74.4

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 (93) hide show
  1. package/Libraries/AppDelegate/RCTAppDelegate.mm +4 -1
  2. package/Libraries/AppDelegate/RCTRootViewFactory.h +8 -0
  3. package/Libraries/AppDelegate/RCTRootViewFactory.mm +11 -3
  4. package/Libraries/AppDelegate/React-RCTAppDelegate.podspec +2 -2
  5. package/Libraries/Blob/React-RCTBlob.podspec +1 -1
  6. package/Libraries/Core/ReactNativeVersion.js +1 -1
  7. package/Libraries/Image/RCTImageLoader.mm +2 -6
  8. package/Libraries/Image/React-RCTImage.podspec +1 -1
  9. package/Libraries/LinkingIOS/React-RCTLinking.podspec +1 -1
  10. package/Libraries/NativeAnimation/React-RCTAnimation.podspec +1 -1
  11. package/Libraries/Network/RCTNetworkTask.mm +4 -3
  12. package/Libraries/Network/React-RCTNetwork.podspec +1 -1
  13. package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +1 -1
  14. package/Libraries/Settings/React-RCTSettings.podspec +1 -1
  15. package/Libraries/Text/React-RCTText.podspec +1 -1
  16. package/Libraries/Text/TextInput/Multiline/RCTUITextView.mm +6 -0
  17. package/Libraries/Text/TextInput/RCTBackedTextInputViewProtocol.h +1 -0
  18. package/Libraries/Text/TextInput/Singleline/RCTUITextField.mm +5 -0
  19. package/Libraries/TypeSafety/RCTTypeSafety.podspec +1 -1
  20. package/Libraries/Vibration/React-RCTVibration.podspec +1 -1
  21. package/React/Base/RCTVersion.m +1 -1
  22. package/React/CoreModules/React-CoreModules.podspec +1 -1
  23. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +6 -1
  24. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +4 -0
  25. package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +3 -2
  26. package/React/React-RCTFabric.podspec +1 -1
  27. package/React/Views/RCTComponentData.m +11 -3
  28. package/React-Core.podspec +1 -1
  29. package/ReactAndroid/gradle.properties +1 -1
  30. package/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +2 -4
  31. package/ReactAndroid/src/main/java/com/facebook/react/modules/core/JavaTimerManager.java +5 -2
  32. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  33. package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java +3 -1
  34. package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactSurfaceView.java +5 -0
  35. package/ReactApple/Libraries/RCTFoundation/RCTDeprecation/RCTDeprecation.podspec +1 -1
  36. package/ReactCommon/React-Fabric.podspec +1 -1
  37. package/ReactCommon/React-FabricImage.podspec +1 -1
  38. package/ReactCommon/React-Mapbuffer.podspec +1 -1
  39. package/ReactCommon/React-nativeconfig.podspec +1 -1
  40. package/ReactCommon/React-rncore.podspec +1 -1
  41. package/ReactCommon/ReactCommon.podspec +1 -1
  42. package/ReactCommon/cxxreact/React-cxxreact.podspec +1 -1
  43. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  44. package/ReactCommon/hermes/React-hermes.podspec +1 -1
  45. package/ReactCommon/hermes/executor/React-jsitracing.podspec +1 -1
  46. package/ReactCommon/jsc/JSCRuntime.cpp +30 -2
  47. package/ReactCommon/jserrorhandler/React-jserrorhandler.podspec +1 -1
  48. package/ReactCommon/jsi/jsi/decorator.h +7 -0
  49. package/ReactCommon/jsi/jsi/jsi.h +7 -0
  50. package/ReactCommon/jsiexecutor/React-jsiexecutor.podspec +1 -1
  51. package/ReactCommon/jsinspector-modern/React-jsinspector.podspec +1 -1
  52. package/ReactCommon/react/debug/React-debug.podspec +1 -1
  53. package/ReactCommon/react/featureflags/React-featureflags.podspec +1 -1
  54. package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp +53 -10
  55. package/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +1 -1
  56. package/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec +1 -1
  57. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm +4 -3
  58. package/ReactCommon/react/renderer/debug/React-rendererdebug.podspec +1 -1
  59. package/ReactCommon/react/renderer/graphics/React-graphics.podspec +1 -1
  60. package/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec +1 -1
  61. package/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +1 -1
  62. package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +0 -1
  63. package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Legacy.cpp +3 -3
  64. package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.cpp +28 -28
  65. package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.h +3 -3
  66. package/ReactCommon/react/renderer/runtimescheduler/Task.cpp +9 -7
  67. package/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp +46 -0
  68. package/ReactCommon/react/runtime/React-RuntimeCore.podspec +1 -1
  69. package/ReactCommon/react/runtime/React-RuntimeHermes.podspec +1 -1
  70. package/ReactCommon/react/runtime/platform/ios/React-RuntimeApple.podspec +1 -1
  71. package/ReactCommon/react/utils/React-utils.podspec +1 -1
  72. package/ReactCommon/reactperflogger/React-perflogger.podspec +1 -1
  73. package/package.json +11 -11
  74. package/scripts/cocoapods/helpers.rb +4 -0
  75. package/scripts/cocoapods/new_architecture.rb +10 -23
  76. package/scripts/cocoapods/privacy_manifest_utils.rb +11 -5
  77. package/scripts/cocoapods/utils.rb +12 -1
  78. package/scripts/codegen/generate-artifacts-executor.js +1 -1
  79. package/scripts/react_native_pods.rb +4 -0
  80. package/scripts/react_native_pods_utils/script_phases.sh +1 -1
  81. package/sdks/.hermesversion +1 -1
  82. package/sdks/hermes-engine/hermes-engine.podspec +2 -1
  83. package/sdks/hermes-engine/utils/build-apple-framework.sh +11 -5
  84. package/sdks/hermes-engine/utils/build-hermes-xcode.sh +11 -5
  85. package/sdks/hermes-engine/utils/build-ios-framework.sh +17 -5
  86. package/sdks/hermes-engine/utils/create-dummy-hermes-xcframework.sh +1 -1
  87. package/sdks/hermesc/osx-bin/hermes +0 -0
  88. package/sdks/hermesc/osx-bin/hermesc +0 -0
  89. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  90. package/template/package.json +5 -5
  91. package/third-party-podspecs/RCT-Folly.podspec +1 -1
  92. package/third-party-podspecs/fmt.podspec +1 -1
  93. package/ReactCommon/react/renderer/runtimescheduler/ErrorUtils.h +0 -34
@@ -65,7 +65,6 @@
65
65
  [RCTComponentViewFactory currentComponentViewFactory].thirdPartyFabricComponentsProvider = self;
66
66
  }
67
67
  [self _logWarnIfCreateRootViewWithBridgeIsOverridden];
68
- [self customizeRootView:(RCTRootView *)rootView];
69
68
 
70
69
  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
71
70
  UIViewController *rootViewController = [self createRootViewController];
@@ -261,6 +260,10 @@
261
260
  return [weakSelf createBridgeWithDelegate:delegate launchOptions:launchOptions];
262
261
  };
263
262
 
263
+ configuration.customizeRootView = ^(UIView *_Nonnull rootView) {
264
+ [weakSelf customizeRootView:(RCTRootView *)rootView];
265
+ };
266
+
264
267
  return [[RCTRootViewFactory alloc] initWithConfiguration:configuration andTurboModuleManagerDelegate:self];
265
268
  }
266
269
 
@@ -23,6 +23,7 @@ typedef UIView *_Nonnull (
23
23
  ^RCTCreateRootViewWithBridgeBlock)(RCTBridge *bridge, NSString *moduleName, NSDictionary *initProps);
24
24
  typedef RCTBridge *_Nonnull (
25
25
  ^RCTCreateBridgeWithDelegateBlock)(id<RCTBridgeDelegate> delegate, NSDictionary *launchOptions);
26
+ typedef void (^RCTCustomizeRootViewBlock)(UIView *rootView);
26
27
  typedef NSURL *_Nullable (^RCTSourceURLForBridgeBlock)(RCTBridge *bridge);
27
28
  typedef NSURL *_Nullable (^RCTBundleURLBlock)(void);
28
29
  typedef NSArray<id<RCTBridgeModule>> *_Nonnull (^RCTExtraModulesForBridgeBlock)(RCTBridge *bridge);
@@ -91,6 +92,13 @@ typedef BOOL (^RCTBridgeDidNotFindModuleBlock)(RCTBridge *bridge, NSString *modu
91
92
  */
92
93
  @property (nonatomic, nullable) RCTCreateBridgeWithDelegateBlock createBridgeWithDelegate;
93
94
 
95
+ /**
96
+ * Block that allows to customize the rootView that is passed to React Native.
97
+ *
98
+ * @parameter: rootView - The root view to customize.
99
+ */
100
+ @property (nonatomic, nullable) RCTCustomizeRootViewBlock customizeRootView;
101
+
94
102
  @end
95
103
 
96
104
  #pragma mark - RCTRootViewFactory
@@ -145,17 +145,25 @@ static NSDictionary *updateInitialProps(NSDictionary *initialProps, BOOL isFabri
145
145
  initWithSurface:surface
146
146
  sizeMeasureMode:RCTSurfaceSizeMeasureModeWidthExact | RCTSurfaceSizeMeasureModeHeightExact];
147
147
 
148
+ if (self->_configuration.customizeRootView != nil) {
149
+ self->_configuration.customizeRootView(surfaceHostingProxyRootView);
150
+ }
148
151
  return surfaceHostingProxyRootView;
149
152
  }
150
153
 
151
154
  [self createBridgeIfNeeded:launchOptions];
152
155
  [self createBridgeAdapterIfNeeded];
153
156
 
157
+ UIView *rootView;
154
158
  if (self->_configuration.createRootViewWithBridge != nil) {
155
- return self->_configuration.createRootViewWithBridge(self.bridge, moduleName, initProps);
159
+ rootView = self->_configuration.createRootViewWithBridge(self.bridge, moduleName, initProps);
160
+ } else {
161
+ rootView = [self createRootViewWithBridge:self.bridge moduleName:moduleName initProps:initProps];
156
162
  }
157
-
158
- return [self createRootViewWithBridge:self.bridge moduleName:moduleName initProps:initProps];
163
+ if (self->_configuration.customizeRootView != nil) {
164
+ self->_configuration.customizeRootView(rootView);
165
+ }
166
+ return rootView;
159
167
  }
160
168
 
161
169
  - (RCTBridge *)createBridgeWithDelegate:(id<RCTBridgeDelegate>)delegate launchOptions:(NSDictionary *)launchOptions
@@ -26,7 +26,7 @@ use_hermes = ENV['USE_HERMES'] == nil || ENV['USE_HERMES'] == '1'
26
26
  new_arch_enabled_flag = (is_new_arch_enabled ? " -DRCT_NEW_ARCH_ENABLED" : "")
27
27
  is_fabric_enabled = true #is_new_arch_enabled || ENV["RCT_FABRIC_ENABLED"]
28
28
  hermes_flag = (use_hermes ? " -DUSE_HERMES" : "")
29
- other_cflags = "$(inherited)" + folly_compiler_flags + new_arch_enabled_flag + hermes_flag
29
+ other_cflags = "$(inherited) " + folly_compiler_flags + new_arch_enabled_flag + hermes_flag
30
30
 
31
31
  header_search_paths = [
32
32
  "$(PODS_TARGET_SRCROOT)/../../ReactCommon",
@@ -61,7 +61,7 @@ Pod::Spec.new do |s|
61
61
  s.pod_target_xcconfig = {
62
62
  "HEADER_SEARCH_PATHS" => header_search_paths,
63
63
  "OTHER_CPLUSPLUSFLAGS" => other_cflags,
64
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
64
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
65
65
  "DEFINES_MODULE" => "YES"
66
66
  }
67
67
  s.user_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/React-Core\""}
@@ -43,7 +43,7 @@ Pod::Spec.new do |s|
43
43
  s.header_dir = "RCTBlob"
44
44
  s.pod_target_xcconfig = {
45
45
  "USE_HEADERMAP" => "YES",
46
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
46
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
47
47
  "HEADER_SEARCH_PATHS" => header_search_paths.join(' ')
48
48
  }
49
49
 
@@ -16,7 +16,7 @@ const version: $ReadOnly<{
16
16
  }> = {
17
17
  major: 0,
18
18
  minor: 74,
19
- patch: 2,
19
+ patch: 4,
20
20
  prerelease: null,
21
21
  };
22
22
 
@@ -44,11 +44,7 @@ static NSInteger RCTImageBytesForImage(UIImage *image)
44
44
  return image.images ? image.images.count * singleImageBytes : singleImageBytes;
45
45
  }
46
46
 
47
- static uint64_t getNextImageRequestCount(void)
48
- {
49
- static uint64_t requestCounter = 0;
50
- return requestCounter++;
51
- }
47
+ static auto currentRequestCount = std::atomic<uint64_t>(0);
52
48
 
53
49
  static NSError *addResponseHeadersToError(NSError *originalError, NSHTTPURLResponse *response)
54
50
  {
@@ -522,7 +518,7 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image, CGSize size, CGFloat scal
522
518
  auto cancelled = std::make_shared<std::atomic<int>>(0);
523
519
  __block dispatch_block_t cancelLoad = nil;
524
520
  __block NSLock *cancelLoadLock = [NSLock new];
525
- NSString *requestId = [NSString stringWithFormat:@"%@-%llu", [[NSUUID UUID] UUIDString], getNextImageRequestCount()];
521
+ NSString *requestId = [NSString stringWithFormat:@"%@-%llu", [[NSUUID UUID] UUIDString], currentRequestCount++];
526
522
 
527
523
  void (^completionHandler)(NSError *, id, id, NSURLResponse *) =
528
524
  ^(NSError *error, id imageOrData, id imageMetadata, NSURLResponse *response) {
@@ -42,7 +42,7 @@ Pod::Spec.new do |s|
42
42
  s.header_dir = "RCTImage"
43
43
  s.pod_target_xcconfig = {
44
44
  "USE_HEADERMAP" => "YES",
45
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
45
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
46
46
  "HEADER_SEARCH_PATHS" => header_search_paths.join(' ')
47
47
  }
48
48
  s.framework = ["Accelerate", "UIKit"]
@@ -41,7 +41,7 @@ Pod::Spec.new do |s|
41
41
  s.header_dir = "RCTLinking"
42
42
  s.pod_target_xcconfig = {
43
43
  "USE_HEADERMAP" => "YES",
44
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
44
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
45
45
  "HEADER_SEARCH_PATHS" => header_search_paths.join(' ')
46
46
  }
47
47
 
@@ -40,7 +40,7 @@ Pod::Spec.new do |s|
40
40
  s.header_dir = "RCTAnimation"
41
41
  s.pod_target_xcconfig = {
42
42
  "USE_HEADERMAP" => "YES",
43
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
43
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
44
44
  "HEADER_SEARCH_PATHS" => header_search_paths.join(" ")
45
45
  }
46
46
 
@@ -5,6 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+ #import <atomic>
8
9
  #import <mutex>
9
10
 
10
11
  #import <React/RCTLog.h>
@@ -20,6 +21,8 @@
20
21
  RCTNetworkTask *_selfReference;
21
22
  }
22
23
 
24
+ static auto currentRequestId = std::atomic<NSUInteger>(0);
25
+
23
26
  - (instancetype)initWithRequest:(NSURLRequest *)request
24
27
  handler:(id<RCTURLRequestHandler>)handler
25
28
  callbackQueue:(dispatch_queue_t)callbackQueue
@@ -28,10 +31,8 @@
28
31
  RCTAssertParam(handler);
29
32
  RCTAssertParam(callbackQueue);
30
33
 
31
- static NSUInteger requestID = 0;
32
-
33
34
  if ((self = [super init])) {
34
- _requestID = @(requestID++);
35
+ _requestID = @(currentRequestId++);
35
36
  _request = request;
36
37
  _handler = handler;
37
38
  _callbackQueue = callbackQueue;
@@ -40,7 +40,7 @@ Pod::Spec.new do |s|
40
40
  s.header_dir = "RCTNetwork"
41
41
  s.pod_target_xcconfig = {
42
42
  "USE_HEADERMAP" => "YES",
43
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
43
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
44
44
  "HEADER_SEARCH_PATHS" => header_search_paths.join(' ')
45
45
  }
46
46
  s.frameworks = "MobileCoreServices"
@@ -41,7 +41,7 @@ Pod::Spec.new do |s|
41
41
  s.header_dir = "RCTPushNotification"
42
42
  s.pod_target_xcconfig = {
43
43
  "USE_HEADERMAP" => "YES",
44
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
44
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
45
45
  "HEADER_SEARCH_PATHS" => header_search_paths.join(' ')
46
46
  }
47
47
  s.framework = "UserNotifications"
@@ -41,7 +41,7 @@ Pod::Spec.new do |s|
41
41
  s.header_dir = "RCTSettings"
42
42
  s.pod_target_xcconfig = {
43
43
  "USE_HEADERMAP" => "YES",
44
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
44
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
45
45
  "HEADER_SEARCH_PATHS" => header_search_paths.join(' ')
46
46
  }
47
47
 
@@ -30,7 +30,7 @@ Pod::Spec.new do |s|
30
30
  s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
31
31
  s.header_dir = "RCTText"
32
32
  s.framework = ["MobileCoreServices"]
33
- s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++20" }
33
+ s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard() }
34
34
 
35
35
  s.dependency "Yoga"
36
36
  s.dependency "React-Core/RCTTextHeaders", version
@@ -163,6 +163,12 @@ static UIColor *defaultPlaceholderColor(void)
163
163
  [super setSelectedTextRange:selectedTextRange];
164
164
  }
165
165
 
166
+ // After restoring the previous cursor position, we manually trigger the scroll to the new cursor position (PR 38679).
167
+ - (void)scrollRangeToVisible:(NSRange)range
168
+ {
169
+ [super scrollRangeToVisible:range];
170
+ }
171
+
166
172
  - (void)paste:(id)sender
167
173
  {
168
174
  _textWasPasted = YES;
@@ -43,6 +43,7 @@ NS_ASSUME_NONNULL_BEGIN
43
43
  // If the change was a result of user actions (like typing or touches), we MUST notify the delegate.
44
44
  - (void)setSelectedTextRange:(nullable UITextRange *)selectedTextRange NS_UNAVAILABLE;
45
45
  - (void)setSelectedTextRange:(nullable UITextRange *)selectedTextRange notifyDelegate:(BOOL)notifyDelegate;
46
+ - (void)scrollRangeToVisible:(NSRange)selectedTextRange;
46
47
 
47
48
  // This protocol disallows direct access to `text` property because
48
49
  // unwise usage of it can break the `attributeText` behavior.
@@ -201,6 +201,11 @@
201
201
  [super setSelectedTextRange:selectedTextRange];
202
202
  }
203
203
 
204
+ - (void)scrollRangeToVisible:(NSRange)range
205
+ {
206
+ // Singleline TextInput does not require scrolling after calling setSelectedTextRange (PR 38679).
207
+ }
208
+
204
209
  - (void)paste:(id)sender
205
210
  {
206
211
  _textWasPasted = YES;
@@ -29,7 +29,7 @@ Pod::Spec.new do |s|
29
29
  s.header_dir = "RCTTypeSafety"
30
30
  s.pod_target_xcconfig = {
31
31
  "USE_HEADERMAP" => "YES",
32
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
32
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
33
33
  "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/Libraries/TypeSafety\""
34
34
  }
35
35
 
@@ -41,7 +41,7 @@ Pod::Spec.new do |s|
41
41
  s.header_dir = "RCTVibration"
42
42
  s.pod_target_xcconfig = {
43
43
  "USE_HEADERMAP" => "YES",
44
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
44
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
45
45
  "HEADER_SEARCH_PATHS" => header_search_paths.join(' ')
46
46
  }
47
47
  s.frameworks = "AudioToolbox"
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(74),
26
- RCTVersionPatch: @(2),
26
+ RCTVersionPatch: @(4),
27
27
  RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
@@ -44,7 +44,7 @@ Pod::Spec.new do |s|
44
44
  s.header_dir = "CoreModules"
45
45
  s.pod_target_xcconfig = {
46
46
  "USE_HEADERMAP" => "YES",
47
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
47
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
48
48
  "HEADER_SEARCH_PATHS" => header_search_paths.join(" ")
49
49
  }
50
50
  s.framework = "UIKit"
@@ -122,8 +122,8 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
122
122
  {
123
123
  if (self = [super initWithFrame:frame]) {
124
124
  _props = ScrollViewShadowNode::defaultSharedProps();
125
-
126
125
  _scrollView = [[RCTEnhancedScrollView alloc] initWithFrame:self.bounds];
126
+ _scrollView.clipsToBounds = _props->getClipsContentToBounds();
127
127
  _scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
128
128
  _scrollView.delaysContentTouches = NO;
129
129
  ((RCTEnhancedScrollView *)_scrollView).overridingDelegate = self;
@@ -253,6 +253,11 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
253
253
  }
254
254
  }
255
255
 
256
+ // Overflow prop
257
+ if (oldScrollViewProps.getClipsContentToBounds() != newScrollViewProps.getClipsContentToBounds()) {
258
+ _scrollView.clipsToBounds = newScrollViewProps.getClipsContentToBounds();
259
+ }
260
+
256
261
  MAP_SCROLL_VIEW_PROP(zoomScale);
257
262
 
258
263
  if (oldScrollViewProps.contentInset != newScrollViewProps.contentInset) {
@@ -594,6 +594,9 @@ using namespace facebook::react;
594
594
  UITextRange *selectedRange = _backedTextInputView.selectedTextRange;
595
595
  NSInteger oldTextLength = _backedTextInputView.attributedText.string.length;
596
596
  _backedTextInputView.attributedText = attributedString;
597
+ // Updating the UITextView attributedText, for example changing the lineHeight, the color or adding
598
+ // a new paragraph with \n, causes the cursor to move to the end of the Text and scroll.
599
+ // This is fixed by restoring the cursor position and scrolling to that position (iOS issue 652653).
597
600
  if (selectedRange.empty) {
598
601
  // Maintaining a cursor position relative to the end of the old text.
599
602
  NSInteger offsetStart = [_backedTextInputView offsetFromPosition:_backedTextInputView.beginningOfDocument
@@ -604,6 +607,7 @@ using namespace facebook::react;
604
607
  offset:newOffset];
605
608
  [_backedTextInputView setSelectedTextRange:[_backedTextInputView textRangeFromPosition:position toPosition:position]
606
609
  notifyDelegate:YES];
610
+ [_backedTextInputView scrollRangeToVisible:NSMakeRange(offsetStart, 0)];
607
611
  }
608
612
  [self _restoreTextSelection];
609
613
  _lastStringStateWasUpdatedWith = attributedString;
@@ -633,8 +633,9 @@ static RCTBorderStyle RCTBorderStyleFromBorderStyle(BorderStyle borderStyle)
633
633
  // iOS draws borders in front of the content whereas CSS draws them behind
634
634
  // the content. For this reason, only use iOS border drawing when clipping
635
635
  // or when the border is hidden.
636
- borderMetrics.borderWidths.left == 0 ||
637
- colorComponentsFromColor(borderMetrics.borderColors.left).alpha == 0 || self.clipsToBounds);
636
+ borderMetrics.borderWidths.left == 0 || self.clipsToBounds ||
637
+ (colorComponentsFromColor(borderMetrics.borderColors.left).alpha == 0 &&
638
+ (*borderMetrics.borderColors.left).getUIColor() != nullptr));
638
639
 
639
640
  CGColorRef backgroundColor = [_backgroundColor resolvedColorWithTraitCollection:self.traitCollection].CGColor;
640
641
 
@@ -60,7 +60,7 @@ Pod::Spec.new do |s|
60
60
  s.pod_target_xcconfig = {
61
61
  "HEADER_SEARCH_PATHS" => header_search_paths,
62
62
  "OTHER_CFLAGS" => "$(inherited) " + folly_compiler_flags + new_arch_flags,
63
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20"
63
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard()
64
64
  }.merge!(ENV['USE_FRAMEWORKS'] != nil ? {
65
65
  "PUBLIC_HEADERS_FOLDER_PATH" => "#{module_name}.framework/Headers/#{header_dir}"
66
66
  }: {})
@@ -61,12 +61,20 @@ static SEL selectorForType(NSString *type)
61
61
  return self;
62
62
  }
63
63
 
64
+ - (BOOL)isBridgeMode
65
+ {
66
+ // If we are in bridge mode, the bridge is RCTBridge
67
+ // If we are bridgeless, the bridge is RCTBridgeProxy
68
+ return [_bridge isKindOfClass:[RCTBridge class]];
69
+ }
70
+
64
71
  - (RCTViewManager *)manager
65
72
  {
66
- if (!_manager && _bridge) {
73
+ if (!_manager && [self isBridgeMode]) {
67
74
  _manager = [_bridge moduleForClass:_managerClass];
68
75
  } else if (!_manager && !_bridgelessViewManager) {
69
76
  _bridgelessViewManager = [_managerClass new];
77
+ _bridgelessViewManager.bridge = _bridge;
70
78
  [[NSNotificationCenter defaultCenter] postNotificationName:RCTDidInitializeModuleNotification
71
79
  object:nil
72
80
  userInfo:@{@"module" : _bridgelessViewManager}];
@@ -265,8 +273,8 @@ static RCTPropBlock createNSInvocationSetter(NSMethodSignature *typeSignature, S
265
273
  type == NSSelectorFromString(@"RCTDirectEventBlock:") ||
266
274
  type == NSSelectorFromString(@"RCTCapturingEventBlock:")) {
267
275
  // Special case for event handlers
268
- setterBlock =
269
- createEventSetter(name, setter, self.eventInterceptor, _bridge ? _bridge.eventDispatcher : _eventDispatcher);
276
+ setterBlock = createEventSetter(
277
+ name, setter, self.eventInterceptor, [self isBridgeMode] ? _bridge.eventDispatcher : _eventDispatcher);
270
278
  } else {
271
279
  // Ordinary property handlers
272
280
  NSMethodSignature *typeSignature = [[RCTConvert class] methodSignatureForSelector:type];
@@ -72,7 +72,7 @@ Pod::Spec.new do |s|
72
72
  "HEADER_SEARCH_PATHS" => header_search_paths,
73
73
  "DEFINES_MODULE" => "YES",
74
74
  "GCC_PREPROCESSOR_DEFINITIONS" => "RCT_METRO_PORT=${RCT_METRO_PORT}",
75
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
75
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
76
76
  "FRAMEWORK_SEARCH_PATHS" => frameworks_search_paths.join(" ")
77
77
  }
78
78
  s.user_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/React-Core\""}
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.74.2
1
+ VERSION_NAME=0.74.4
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
 
4
4
  android.useAndroidX=true
@@ -432,10 +432,8 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
432
432
 
433
433
  if (mShouldLogContentAppeared) {
434
434
  mShouldLogContentAppeared = false;
435
-
436
- if (mJSModuleName != null) {
437
- ReactMarker.logMarker(ReactMarkerConstants.CONTENT_APPEARED, mJSModuleName, mRootViewTag);
438
- }
435
+ String jsModuleName = getJSModuleName();
436
+ ReactMarker.logMarker(ReactMarkerConstants.CONTENT_APPEARED, jsModuleName, mRootViewTag);
439
437
  }
440
438
  }
441
439
 
@@ -99,8 +99,11 @@ public class JavaTimerManager {
99
99
  }
100
100
 
101
101
  // If the JS thread is busy for multiple frames we cancel any other pending runnable.
102
- if (mCurrentIdleCallbackRunnable != null) {
103
- mCurrentIdleCallbackRunnable.cancel();
102
+ // We also capture the idleCallbackRunnable to tentatively fix:
103
+ // https://github.com/facebook/react-native/issues/44842
104
+ IdleCallbackRunnable idleCallbackRunnable = mCurrentIdleCallbackRunnable;
105
+ if (idleCallbackRunnable != null) {
106
+ idleCallbackRunnable.cancel();
104
107
  }
105
108
 
106
109
  mCurrentIdleCallbackRunnable = new IdleCallbackRunnable(frameTimeNanos);
@@ -17,6 +17,6 @@ public class ReactNativeVersion {
17
17
  public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
18
18
  "major", 0,
19
19
  "minor", 74,
20
- "patch", 2,
20
+ "patch", 4,
21
21
  "prerelease", null);
22
22
  }
@@ -378,7 +378,9 @@ public class ReactHostImpl implements ReactHost {
378
378
  public ReactSurface createSurface(
379
379
  Context context, String moduleName, @Nullable Bundle initialProps) {
380
380
  ReactSurfaceImpl surface = new ReactSurfaceImpl(context, moduleName, initialProps);
381
- surface.attachView(new ReactSurfaceView(context, surface));
381
+ ReactSurfaceView surfaceView = new ReactSurfaceView(context, surface);
382
+ surfaceView.setShouldLogContentAppeared(true);
383
+ surface.attachView(surfaceView);
382
384
  surface.attach(this);
383
385
  return surface;
384
386
  }
@@ -189,6 +189,11 @@ public class ReactSurfaceView extends ReactRootView {
189
189
  return UIManagerType.FABRIC;
190
190
  }
191
191
 
192
+ @Override
193
+ public String getJSModuleName() {
194
+ return mSurface.getModuleName();
195
+ }
196
+
192
197
  @Override
193
198
  protected void dispatchJSTouchEvent(MotionEvent event) {
194
199
  if (mJSTouchDispatcher == null) {
@@ -19,7 +19,7 @@ Pod::Spec.new do |s|
19
19
  s.source_files = ["Exported/*.h", "RCTDeprecation.m"]
20
20
  s.pod_target_xcconfig = {
21
21
  "DEFINES_MODULE" => "YES",
22
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20"
22
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard()
23
23
  }
24
24
  s.compiler_flags = "-Wnullable-to-nonnull-conversion -Wnullability-completeness"
25
25
  end
@@ -35,7 +35,7 @@ Pod::Spec.new do |s|
35
35
  s.source = source
36
36
  s.source_files = "dummyFile.cpp"
37
37
  s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES",
38
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
38
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
39
39
  "DEFINES_MODULE" => "YES" }
40
40
 
41
41
  if ENV['USE_FRAMEWORKS']
@@ -56,7 +56,7 @@ Pod::Spec.new do |s|
56
56
  s.header_dir = "react/renderer/components/image"
57
57
  s.compiler_flags = folly_compiler_flags
58
58
  s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES",
59
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
59
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
60
60
  "HEADER_SEARCH_PATHS" => header_search_path.join(" ")
61
61
  }
62
62
 
@@ -30,7 +30,7 @@ Pod::Spec.new do |s|
30
30
  s.public_header_files = 'react/renderer/mapbuffer/*.h'
31
31
  s.header_dir = "react/renderer/mapbuffer"
32
32
  s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\"", "USE_HEADERMAP" => "YES",
33
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20" }
33
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard() }
34
34
 
35
35
  if ENV['USE_FRAMEWORKS']
36
36
  s.header_mappings_dir = './'
@@ -27,7 +27,7 @@ Pod::Spec.new do |s|
27
27
  s.source = source
28
28
  s.source_files = "react/config/*.{m,mm,cpp,h}"
29
29
  s.header_dir = "react/config"
30
- s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++20" }
30
+ s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard() }
31
31
 
32
32
  if ENV['USE_FRAMEWORKS']
33
33
  s.header_mappings_dir = './'
@@ -48,5 +48,5 @@ Pod::Spec.new do |s|
48
48
  s.source_files = "dummyFile.cpp"
49
49
  s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES",
50
50
  "HEADER_SEARCH_PATHS" => header_search_paths.join(' '),
51
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20" }
51
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard() }
52
52
  end
@@ -37,7 +37,7 @@ Pod::Spec.new do |s|
37
37
  s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\" \"$(PODS_ROOT)/Headers/Private/React-Core\"",
38
38
  "USE_HEADERMAP" => "YES",
39
39
  "DEFINES_MODULE" => "YES",
40
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
40
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
41
41
  "GCC_WARN_PEDANTIC" => "YES" }
42
42
  if ENV['USE_FRAMEWORKS']
43
43
  s.header_mappings_dir = './'
@@ -36,7 +36,7 @@ Pod::Spec.new do |s|
36
36
  s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
37
37
  s.pod_target_xcconfig = {
38
38
  "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-debug/React_debug.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-runtimeexecutor/React_runtimeexecutor.framework/Headers\"",
39
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20"
39
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard()
40
40
  }
41
41
  s.header_dir = "cxxreact"
42
42
 
@@ -17,7 +17,7 @@ namespace facebook::react {
17
17
  constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 74;
20
- int32_t Patch = 2;
20
+ int32_t Patch = 4;
21
21
  std::string_view Prerelease = "";
22
22
  } ReactNativeVersion;
23
23
 
@@ -37,7 +37,7 @@ Pod::Spec.new do |s|
37
37
  s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
38
38
  s.pod_target_xcconfig = {
39
39
  "HEADER_SEARCH_PATHS" => "\"${PODS_ROOT}/hermes-engine/destroot/include\" \"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\"",
40
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20"
40
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard()
41
41
  }
42
42
  s.header_dir = "reacthermes"
43
43
  s.dependency "React-cxxreact", version
@@ -29,7 +29,7 @@ Pod::Spec.new do |s|
29
29
  s.header_dir = "."
30
30
  s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"${PODS_TARGET_SRCROOT}/../..\"",
31
31
  "USE_HEADERMAP" => "YES",
32
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
32
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
33
33
  "GCC_WARN_PEDANTIC" => "YES" }
34
34
 
35
35
  if ENV['USE_FRAMEWORKS']