react-native 0.73.2 → 0.73.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 (32) hide show
  1. package/Libraries/AppDelegate/RCTAppDelegate.h +0 -2
  2. package/Libraries/AppDelegate/RCTAppDelegate.mm +20 -13
  3. package/Libraries/Components/Touchable/TouchableBounce.js +4 -0
  4. package/Libraries/Components/Touchable/TouchableHighlight.js +1 -0
  5. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +4 -0
  6. package/Libraries/Components/Touchable/TouchableOpacity.js +4 -0
  7. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +4 -0
  8. package/Libraries/Core/ReactNativeVersion.js +1 -1
  9. package/React/Base/RCTVersion.m +1 -1
  10. package/React/CoreModules/RCTDeviceInfo.mm +33 -0
  11. package/React/Modules/RCTUIManager.m +9 -3
  12. package/ReactAndroid/gradle.properties +1 -1
  13. package/ReactAndroid/src/main/java/com/facebook/react/ReactActivity.java +1 -0
  14. package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadHandler.java +11 -0
  15. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  16. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java +9 -1
  17. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  18. package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +2 -2
  19. package/ReactCommon/react/renderer/core/EventEmitter.cpp +14 -6
  20. package/ReactCommon/react/renderer/debug/flags.h +2 -4
  21. package/ReactCommon/react/renderer/debug/tests/DebugStringConvertibleTest.cpp +2 -0
  22. package/ReactCommon/react/renderer/templateprocessor/tests/UITemplateProcessorTest.cpp +4 -0
  23. package/package.json +7 -6
  24. package/scripts/cocoapods/utils.rb +4 -40
  25. package/scripts/react-native-xcode.sh +1 -1
  26. package/scripts/react_native_pods.rb +0 -1
  27. package/sdks/hermes-engine/utils/replace_hermes_version.js +1 -1
  28. package/sdks/hermesc/osx-bin/hermes +0 -0
  29. package/sdks/hermesc/osx-bin/hermesc +0 -0
  30. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  31. package/template/Gemfile +4 -2
  32. package/template/package.json +3 -3
@@ -100,8 +100,6 @@
100
100
  * By default, it assigns the rootView to the view property of the rootViewController
101
101
  * If you are not using a simple UIViewController, then there could be other methods to use to setup the rootView.
102
102
  * For example: UISplitViewController requires `setViewController(_:for:)`
103
- *
104
- * @return: void
105
103
  */
106
104
  - (void)setRootView:(UIView *)rootView toRootViewController:(UIViewController *)rootViewController;
107
105
 
@@ -49,6 +49,19 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
49
49
 
50
50
  #endif
51
51
 
52
+ static NSDictionary *updateInitialProps(NSDictionary *initialProps, BOOL isFabricEnabled)
53
+ {
54
+ #ifdef RCT_NEW_ARCH_ENABLED
55
+ NSMutableDictionary *mutableProps = [initialProps mutableCopy] ?: [NSMutableDictionary new];
56
+ // Hardcoding the Concurrent Root as it it not recommended to
57
+ // have the concurrentRoot turned off when Fabric is enabled.
58
+ mutableProps[kRNConcurrentRoot] = @(isFabricEnabled);
59
+ return mutableProps;
60
+ #else
61
+ return initialProps;
62
+ #endif
63
+ }
64
+
52
65
  @interface RCTAppDelegate () <RCTCxxBridgeDelegate> {
53
66
  std::shared_ptr<facebook::react::RuntimeScheduler> _runtimeScheduler;
54
67
  }
@@ -76,10 +89,13 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
76
89
  {
77
90
  BOOL enableTM = NO;
78
91
  BOOL enableBridgeless = NO;
92
+ BOOL fabricEnabled = NO;
79
93
  #if RCT_NEW_ARCH_ENABLED
80
94
  enableTM = self.turboModuleEnabled;
81
95
  enableBridgeless = self.bridgelessEnabled;
96
+ fabricEnabled = [self fabricEnabled];
82
97
  #endif
98
+ NSDictionary *initProps = updateInitialProps([self prepareInitialProps], fabricEnabled);
83
99
 
84
100
  RCTAppSetupPrepareApp(application, enableTM);
85
101
 
@@ -88,7 +104,7 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
88
104
  if (enableBridgeless) {
89
105
  #if RCT_NEW_ARCH_ENABLED
90
106
  // Enable native view config interop only if both bridgeless mode and Fabric is enabled.
91
- RCTSetUseNativeViewConfigsInBridgelessMode([self fabricEnabled]);
107
+ RCTSetUseNativeViewConfigsInBridgelessMode(fabricEnabled);
92
108
 
93
109
  // Enable TurboModule interop by default in Bridgeless mode
94
110
  RCTEnableTurboModuleInterop(YES);
@@ -97,8 +113,7 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
97
113
  [self createReactHost];
98
114
  [self unstable_registerLegacyComponents];
99
115
  [RCTComponentViewFactory currentComponentViewFactory].thirdPartyFabricComponentsProvider = self;
100
- RCTFabricSurface *surface = [_reactHost createSurfaceWithModuleName:self.moduleName
101
- initialProperties:launchOptions];
116
+ RCTFabricSurface *surface = [_reactHost createSurfaceWithModuleName:self.moduleName initialProperties:initProps];
102
117
 
103
118
  RCTSurfaceHostingProxyRootView *surfaceHostingProxyRootView = [[RCTSurfaceHostingProxyRootView alloc]
104
119
  initWithSurface:surface
@@ -118,7 +133,7 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
118
133
  [self unstable_registerLegacyComponents];
119
134
  [RCTComponentViewFactory currentComponentViewFactory].thirdPartyFabricComponentsProvider = self;
120
135
  #endif
121
- NSDictionary *initProps = [self prepareInitialProps];
136
+
122
137
  rootView = [self createRootViewWithBridge:self.bridge moduleName:self.moduleName initProps:initProps];
123
138
  }
124
139
  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
@@ -140,15 +155,7 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
140
155
 
141
156
  - (NSDictionary *)prepareInitialProps
142
157
  {
143
- NSMutableDictionary *initProps = self.initialProps ? [self.initialProps mutableCopy] : [NSMutableDictionary new];
144
-
145
- #ifdef RCT_NEW_ARCH_ENABLED
146
- // Hardcoding the Concurrent Root as it it not recommended to
147
- // have the concurrentRoot turned off when Fabric is enabled.
148
- initProps[kRNConcurrentRoot] = @([self fabricEnabled]);
149
- #endif
150
-
151
- return initProps;
158
+ return self.initialProps;
152
159
  }
153
160
 
154
161
  - (RCTBridge *)createBridgeWithDelegate:(id<RCTBridgeDelegate>)delegate launchOptions:(NSDictionary *)launchOptions
@@ -203,6 +203,10 @@ class TouchableBounce extends React.Component<Props, State> {
203
203
  this.state.pressability.configure(this._createPressabilityConfig());
204
204
  }
205
205
 
206
+ componentDidMount(): mixed {
207
+ this.state.pressability.configure(this._createPressabilityConfig());
208
+ }
209
+
206
210
  componentWillUnmount(): void {
207
211
  this.state.pressability.reset();
208
212
  }
@@ -363,6 +363,7 @@ class TouchableHighlight extends React.Component<Props, State> {
363
363
 
364
364
  componentDidMount(): void {
365
365
  this._isMounted = true;
366
+ this.state.pressability.configure(this._createPressabilityConfig());
366
367
  }
367
368
 
368
369
  componentDidUpdate(prevProps: Props, prevState: State) {
@@ -339,6 +339,10 @@ class TouchableNativeFeedback extends React.Component<Props, State> {
339
339
  this.state.pressability.configure(this._createPressabilityConfig());
340
340
  }
341
341
 
342
+ componentDidMount(): mixed {
343
+ this.state.pressability.configure(this._createPressabilityConfig());
344
+ }
345
+
342
346
  componentWillUnmount(): void {
343
347
  this.state.pressability.reset();
344
348
  }
@@ -314,6 +314,10 @@ class TouchableOpacity extends React.Component<Props, State> {
314
314
  }
315
315
  }
316
316
 
317
+ componentDidMount(): void {
318
+ this.state.pressability.configure(this._createPressabilityConfig());
319
+ }
320
+
317
321
  componentWillUnmount(): void {
318
322
  this.state.pressability.reset();
319
323
  }
@@ -189,6 +189,10 @@ class TouchableWithoutFeedback extends React.Component<Props, State> {
189
189
  this.state.pressability.configure(createPressabilityConfig(this.props));
190
190
  }
191
191
 
192
+ componentDidMount(): mixed {
193
+ this.state.pressability.configure(createPressabilityConfig(this.props));
194
+ }
195
+
192
196
  componentWillUnmount(): void {
193
197
  this.state.pressability.reset();
194
198
  }
@@ -12,6 +12,6 @@
12
12
  exports.version = {
13
13
  major: 0,
14
14
  minor: 73,
15
- patch: 2,
15
+ patch: 4,
16
16
  prerelease: null,
17
17
  };
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(73),
26
- RCTVersionPatch: @(2),
26
+ RCTVersionPatch: @(4),
27
27
  RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
@@ -75,11 +75,44 @@ RCT_EXPORT_MODULE()
75
75
  selector:@selector(interfaceFrameDidChange)
76
76
  name:RCTWindowFrameDidChangeNotification
77
77
  object:nil];
78
+
79
+ // TODO T175901725 - Registering the RCTDeviceInfo module to the notification is a short-term fix to unblock 0.73
80
+ // The actual behavior should be that the module is properly registered in the TurboModule/Bridge infrastructure
81
+ // and the infrastructure imperatively invoke the `invalidate` method, rather than listening to a notification.
82
+ // This is a temporary workaround until we can investigate the issue better as there might be other modules in a
83
+ // similar situation.
84
+ [[NSNotificationCenter defaultCenter] addObserver:self
85
+ selector:@selector(invalidate)
86
+ name:RCTBridgeWillInvalidateModulesNotification
87
+ object:nil];
78
88
  }
79
89
 
80
90
  - (void)invalidate
81
91
  {
82
92
  _invalidated = YES;
93
+ [self _cleanupObservers];
94
+ }
95
+
96
+ - (void)_cleanupObservers
97
+ {
98
+ [[NSNotificationCenter defaultCenter] removeObserver:self
99
+ name:RCTAccessibilityManagerDidUpdateMultiplierNotification
100
+ object:[_moduleRegistry moduleForName:"AccessibilityManager"]];
101
+
102
+ [[NSNotificationCenter defaultCenter] removeObserver:self
103
+ name:UIApplicationDidChangeStatusBarOrientationNotification
104
+ object:nil];
105
+
106
+ [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidBecomeActiveNotification object:nil];
107
+
108
+ [[NSNotificationCenter defaultCenter] removeObserver:self name:RCTUserInterfaceStyleDidChangeNotification object:nil];
109
+
110
+ [[NSNotificationCenter defaultCenter] removeObserver:self name:RCTWindowFrameDidChangeNotification object:nil];
111
+
112
+ [[NSNotificationCenter defaultCenter] addObserver:self
113
+ selector:@selector(invalidate)
114
+ name:RCTBridgeWillInvalidateModulesNotification
115
+ object:nil];
83
116
  }
84
117
 
85
118
  static BOOL RCTIsIPhoneNotched()
@@ -179,14 +179,20 @@ RCT_EXPORT_MODULE()
179
179
  _componentDataByName[componentData.name] = componentData;
180
180
  }
181
181
  }
182
-
182
+ // Preload the a11yManager as the RCTUIManager needs it to listen for notification
183
+ // By eagerly preloading it in the setBridge method, we make sure that the manager is
184
+ // properly initialized in the Main Thread and that we do not incur in any race condition
185
+ // or concurrency problem.
186
+ id<RCTBridgeModule> a11yManager = [self->_bridge moduleForName:@"AccessibilityManager"
187
+ lazilyLoadIfNecessary:YES];
188
+ __weak NSObject * a11yManagerWeakObject = a11yManager;
183
189
  // This dispatch_async avoids a deadlock while configuring native modules
184
190
  dispatch_async(dispatch_get_main_queue(), ^{
191
+ __strong NSObject * a11yManagerStrongObject = a11yManagerWeakObject;
185
192
  [[NSNotificationCenter defaultCenter] addObserver:self
186
193
  selector:@selector(didReceiveNewContentSizeMultiplier)
187
194
  name:@"RCTAccessibilityManagerDidUpdateMultiplierNotification"
188
- object:[self->_bridge moduleForName:@"AccessibilityManager"
189
- lazilyLoadIfNecessary:YES]];
195
+ object:a11yManagerStrongObject];
190
196
  });
191
197
  [[NSNotificationCenter defaultCenter] addObserver:self
192
198
  selector:@selector(namedOrientationDidChange)
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.73.2
1
+ VERSION_NAME=0.73.4
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
 
4
4
  android.useAndroidX=true
@@ -113,6 +113,7 @@ public abstract class ReactActivity extends AppCompatActivity
113
113
  @Override
114
114
  public void onRequestPermissionsResult(
115
115
  int requestCode, String[] permissions, int[] grantResults) {
116
+ super.onRequestPermissionsResult(requestCode, permissions, grantResults);
116
117
  mDelegate.onRequestPermissionsResult(requestCode, permissions, grantResults);
117
118
  }
118
119
 
@@ -10,6 +10,8 @@ package com.facebook.react.bridge.queue;
10
10
  import android.os.Handler;
11
11
  import android.os.Looper;
12
12
  import android.os.Message;
13
+ import com.facebook.common.logging.FLog;
14
+ import com.facebook.react.common.ReactConstants;
13
15
 
14
16
  /** Handler that can catch and dispatch Exceptions to an Exception handler. */
15
17
  public class MessageQueueThreadHandler extends Handler {
@@ -26,6 +28,15 @@ public class MessageQueueThreadHandler extends Handler {
26
28
  try {
27
29
  super.dispatchMessage(msg);
28
30
  } catch (Exception e) {
31
+ if (e instanceof NullPointerException) {
32
+ FLog.e(
33
+ ReactConstants.TAG,
34
+ "Caught NullPointerException when dispatching message in MessageQueueThreadHandler. This is likely caused by runnable"
35
+ + "(msg.callback) being nulled in Android Handler after dispatching and before handling (see T170239922 for more details)."
36
+ + "Currently we observe that it only happen once which is during initialisation. Due to fixing probably involve Android "
37
+ + "System code, we decide to ignore here for now and print an error message for debugging purpose in case this cause more serious issues in future.");
38
+ return;
39
+ }
29
40
  mExceptionHandler.handleException(e);
30
41
  }
31
42
  }
@@ -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", 73,
20
- "patch", 2,
20
+ "patch", 4,
21
21
  "prerelease", null);
22
22
  }
@@ -206,7 +206,15 @@ import java.util.Set;
206
206
  }
207
207
  for (String oldKey : keysToNormalize) {
208
208
  Object value = events.get(oldKey);
209
- String newKey = "top" + oldKey.substring(0, 1).toUpperCase() + oldKey.substring(1);
209
+ String baseKey = "";
210
+ if (oldKey.startsWith("on")) {
211
+ // Drop "on" prefix.
212
+ baseKey = oldKey.substring(2);
213
+ } else {
214
+ // Capitalize first letter.
215
+ baseKey = oldKey.substring(0, 1).toUpperCase() + oldKey.substring(1);
216
+ }
217
+ String newKey = "top" + baseKey;
210
218
  events.put(newKey, value);
211
219
  }
212
220
  }
@@ -17,7 +17,7 @@ namespace facebook::react {
17
17
  constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 73;
20
- int32_t Patch = 2;
20
+ int32_t Patch = 4;
21
21
  std::string_view Prerelease = "";
22
22
  } ReactNativeVersion;
23
23
 
@@ -991,7 +991,7 @@ void YogaLayoutableShadowNode::ensureConsistency() const {
991
991
  }
992
992
 
993
993
  void YogaLayoutableShadowNode::ensureYogaChildrenLookFine() const {
994
- #ifdef REACT_NATIVE_DEBUG
994
+ #if defined(REACT_NATIVE_DEBUG) && defined(WITH_FBSYSTRACE)
995
995
  // Checking that the shapes of Yoga node children object look fine.
996
996
  // This is the only heuristic that might produce false-positive results
997
997
  // (really broken dangled nodes might look fine). This is useful as an early
@@ -1009,7 +1009,7 @@ void YogaLayoutableShadowNode::ensureYogaChildrenLookFine() const {
1009
1009
  }
1010
1010
 
1011
1011
  void YogaLayoutableShadowNode::ensureYogaChildrenAlignment() const {
1012
- #ifdef REACT_NATIVE_DEBUG
1012
+ #if defined(REACT_NATIVE_DEBUG) && defined(WITH_FBSYSTRACE)
1013
1013
  // If the node is not a leaf node, checking that:
1014
1014
  // - All children are `YogaLayoutableShadowNode` subclasses.
1015
1015
  // - All Yoga children are owned/connected to corresponding children of
@@ -16,18 +16,26 @@
16
16
 
17
17
  namespace facebook::react {
18
18
 
19
+ static bool hasPrefix(const std::string& str, const std::string& prefix) {
20
+ return str.compare(0, prefix.length(), prefix) == 0;
21
+ }
22
+
19
23
  // TODO(T29874519): Get rid of "top" prefix once and for all.
20
24
  /*
21
- * Capitalizes the first letter of the event type and adds "top" prefix if
22
- * necessary (e.g. "layout" becames "topLayout").
25
+ * Replaces "on" with "top" if present. Or capitalizes the first letter and adds
26
+ * "top" prefix. E.g. "eventName" becomes "topEventName", "onEventName" also
27
+ * becomes "topEventName".
23
28
  */
24
29
  static std::string normalizeEventType(std::string type) {
25
30
  auto prefixedType = std::move(type);
26
- if (prefixedType.find("top", 0) != 0) {
27
- prefixedType.insert(0, "top");
28
- prefixedType[3] = static_cast<char>(toupper(prefixedType[3]));
31
+ if (facebook::react::hasPrefix(prefixedType, "top")) {
32
+ return prefixedType;
33
+ }
34
+ if (facebook::react::hasPrefix(prefixedType, "on")) {
35
+ return "top" + prefixedType.substr(2);
29
36
  }
30
- return prefixedType;
37
+ prefixedType[0] = static_cast<char>(toupper(prefixedType[0]));
38
+ return "top" + prefixedType;
31
39
  }
32
40
 
33
41
  std::mutex& EventEmitter::DispatchMutex() {
@@ -26,7 +26,7 @@
26
26
  // Enables some Shadow Tree introspection features (maintains a StubViewTree,
27
27
  // and logs prev/next tree and mutations if there are any discrepancies). If you
28
28
  // define this, also define `RN_DEBUG_STRING_CONVERTIBLE`.
29
- #ifdef REACT_NATIVE_DEBUG
29
+ #if (defined(REACT_NATIVE_DEBUG) && defined(WITH_FBSYSTRACE))
30
30
  #define RN_SHADOW_TREE_INTROSPECTION 1
31
31
  #endif
32
32
 
@@ -34,9 +34,7 @@
34
34
  // Enable if `RN_SHADOW_TREE_INTROSPECTION` is enabled.
35
35
  #ifdef RN_SHADOW_TREE_INTROSPECTION
36
36
  #define RN_DEBUG_STRING_CONVERTIBLE 1
37
- #endif
38
-
39
- #ifndef RN_DEBUG_STRING_CONVERTIBLE
37
+ #else
40
38
  #define RN_DEBUG_STRING_CONVERTIBLE 0
41
39
  #endif
42
40
 
@@ -5,6 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+ #if RN_DEBUG_STRING_CONVERTIBLE
8
9
  #include <memory>
9
10
 
10
11
  #include <gtest/gtest.h>
@@ -82,3 +83,4 @@ TEST(DebugStringConvertibleTest, handleNodeWithComplexProps) {
82
83
  item->getDebugDescription().c_str(),
83
84
  "<View=hello x=1(height=100 width=200)/>");
84
85
  }
86
+ #endif
@@ -5,6 +5,8 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+ #if RN_DEBUG_STRING_CONVERTIBLE
9
+
8
10
  #include <exception>
9
11
 
10
12
  #include <glog/logging.h>
@@ -164,3 +166,5 @@ TEST(UITemplateProcessorTest, testConditionalBytecode) {
164
166
  root2->getChildren().at(0)->getProps());
165
167
  ASSERT_STREQ(child_props2->testId.c_str(), "cond_false");
166
168
  }
169
+
170
+ #endif
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native",
3
- "version": "0.73.2",
3
+ "version": "0.73.4",
4
4
  "description": "A framework for building native apps using React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -93,12 +93,12 @@
93
93
  },
94
94
  "dependencies": {
95
95
  "@jest/create-cache-key-function": "^29.6.3",
96
- "@react-native-community/cli": "12.3.0",
97
- "@react-native-community/cli-platform-android": "12.3.0",
98
- "@react-native-community/cli-platform-ios": "12.3.0",
96
+ "@react-native-community/cli": "12.3.2",
97
+ "@react-native-community/cli-platform-android": "12.3.2",
98
+ "@react-native-community/cli-platform-ios": "12.3.2",
99
99
  "@react-native/assets-registry": "0.73.1",
100
- "@react-native/community-cli-plugin": "0.73.12",
101
- "@react-native/codegen": "0.73.2",
100
+ "@react-native/community-cli-plugin": "0.73.16",
101
+ "@react-native/codegen": "0.73.3",
102
102
  "@react-native/gradle-plugin": "0.73.4",
103
103
  "@react-native/js-polyfills": "0.73.1",
104
104
  "@react-native/normalize-colors": "0.73.2",
@@ -107,6 +107,7 @@
107
107
  "anser": "^1.4.9",
108
108
  "ansi-regex": "^5.0.0",
109
109
  "base64-js": "^1.5.1",
110
+ "chalk": "^4.0.0",
110
111
  "deprecated-react-native-prop-types": "^5.0.0",
111
112
  "event-target-shim": "^5.0.1",
112
113
  "flow-enums-runtime": "^0.0.6",
@@ -162,7 +162,7 @@ class ReactNativePodsUtils
162
162
  project.build_configurations.each do |config|
163
163
  # fix for weak linking
164
164
  self.safe_init(config, other_ld_flags_key)
165
- if self.is_using_xcode15_or_greater(:xcodebuild_manager => xcodebuild_manager)
165
+ if self.is_using_xcode15_0(:xcodebuild_manager => xcodebuild_manager)
166
166
  self.add_value_to_setting_if_missing(config, other_ld_flags_key, xcode15_compatibility_flags)
167
167
  else
168
168
  self.remove_value_to_setting_if_present(config, other_ld_flags_key, xcode15_compatibility_flags)
@@ -387,7 +387,7 @@ class ReactNativePodsUtils
387
387
  end
388
388
  end
389
389
 
390
- def self.is_using_xcode15_or_greater(xcodebuild_manager: Xcodebuild)
390
+ def self.is_using_xcode15_0(xcodebuild_manager: Xcodebuild)
391
391
  xcodebuild_version = xcodebuild_manager.version
392
392
 
393
393
  # The output of xcodebuild -version is something like
@@ -398,7 +398,8 @@ class ReactNativePodsUtils
398
398
  regex = /(\d+)\.(\d+)(?:\.(\d+))?/
399
399
  if match_data = xcodebuild_version.match(regex)
400
400
  major = match_data[1].to_i
401
- return major >= 15
401
+ minor = match_data[2].to_i
402
+ return major == 15 && minor == 0
402
403
  end
403
404
 
404
405
  return false
@@ -538,43 +539,6 @@ class ReactNativePodsUtils
538
539
  ReactNativePodsUtils.update_header_paths_if_depends_on(target_installation_result, "React-ImageManager", header_search_paths)
539
540
  end
540
541
 
541
- def self.get_plist_paths_from(user_project)
542
- info_plists = user_project
543
- .files
544
- .select { |p|
545
- p.name&.end_with?('Info.plist')
546
- }
547
- return info_plists
548
- end
549
-
550
- def self.update_ats_in_plist(plistPaths, parent)
551
- plistPaths.each do |plistPath|
552
- fullPlistPath = File.join(parent, plistPath.path)
553
- plist = Xcodeproj::Plist.read_from_path(fullPlistPath)
554
- ats_configs = {
555
- "NSAllowsArbitraryLoads" => false,
556
- "NSAllowsLocalNetworking" => true,
557
- }
558
- if plist.nil?
559
- plist = {
560
- "NSAppTransportSecurity" => ats_configs
561
- }
562
- else
563
- plist["NSAppTransportSecurity"] ||= {}
564
- plist["NSAppTransportSecurity"] = plist["NSAppTransportSecurity"].merge(ats_configs)
565
- end
566
- Xcodeproj::Plist.write_to_path(plist, fullPlistPath)
567
- end
568
- end
569
-
570
- def self.apply_ats_config(installer)
571
- user_project = installer.aggregate_targets
572
- .map{ |t| t.user_project }
573
- .first
574
- plistPaths = self.get_plist_paths_from(user_project)
575
- self.update_ats_in_plist(plistPaths, user_project.path.parent)
576
- end
577
-
578
542
  def self.react_native_pods
579
543
  return [
580
544
  "DoubleConversion",
@@ -127,7 +127,7 @@ fi
127
127
  PACKAGER_SOURCEMAP_FILE=
128
128
  if [[ $EMIT_SOURCEMAP == true ]]; then
129
129
  if [[ $USE_HERMES != false ]]; then
130
- PACKAGER_SOURCEMAP_FILE="$CONFIGURATION_BUILD_DIR/$(basename $SOURCEMAP_FILE)"
130
+ PACKAGER_SOURCEMAP_FILE="$CONFIGURATION_BUILD_DIR/$(basename "$SOURCEMAP_FILE")"
131
131
  else
132
132
  PACKAGER_SOURCEMAP_FILE="$SOURCEMAP_FILE"
133
133
  fi
@@ -307,7 +307,6 @@ def react_native_post_install(
307
307
  ReactNativePodsUtils.set_node_modules_user_settings(installer, react_native_path)
308
308
  ReactNativePodsUtils.apply_flags_for_fabric(installer, fabric_enabled: fabric_enabled)
309
309
  ReactNativePodsUtils.apply_xcode_15_patch(installer)
310
- ReactNativePodsUtils.apply_ats_config(installer)
311
310
  ReactNativePodsUtils.updateOSDeploymentTarget(installer)
312
311
 
313
312
  NewArchitectureHelper.set_clang_cxx_language_standard_if_needed(installer)
@@ -53,7 +53,7 @@ function shouldReplaceHermesConfiguration(configuration) {
53
53
  }
54
54
 
55
55
  function replaceHermesConfiguration(configuration, version, podsRoot) {
56
- const tarballURLPath = `${podsRoot}/hermes-engine-artifacts/hermes-ios-${version}-${configuration}.tar.gz`;
56
+ const tarballURLPath = `${podsRoot}/hermes-engine-artifacts/hermes-ios-${version.toLowerCase()}-${configuration.toLowerCase()}.tar.gz`;
57
57
 
58
58
  const finalLocation = 'hermes-engine';
59
59
  console.log('Preparing the final location');
Binary file
Binary file
Binary file
package/template/Gemfile CHANGED
@@ -3,5 +3,7 @@ source 'https://rubygems.org'
3
3
  # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4
4
  ruby ">= 2.6.10"
5
5
 
6
- gem 'cocoapods', '~> 1.13'
7
- gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
6
+ # Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
7
+ # bound in the template on Cocoapods with next React Native release.
8
+ gem 'cocoapods', '>= 1.13', '< 1.15'
9
+ gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
@@ -11,15 +11,15 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "react": "18.2.0",
14
- "react-native": "0.73.2"
14
+ "react-native": "0.73.4"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@babel/core": "^7.20.0",
18
18
  "@babel/preset-env": "^7.20.0",
19
19
  "@babel/runtime": "^7.20.0",
20
- "@react-native/babel-preset": "0.73.19",
20
+ "@react-native/babel-preset": "0.73.21",
21
21
  "@react-native/eslint-config": "0.73.2",
22
- "@react-native/metro-config": "0.73.3",
22
+ "@react-native/metro-config": "0.73.5",
23
23
  "@react-native/typescript-config": "0.73.1",
24
24
  "@types/react": "^18.2.6",
25
25
  "@types/react-test-renderer": "^18.0.0",