react-native 0.74.3 → 0.74.5

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 (72) hide show
  1. package/Libraries/AppDelegate/React-RCTAppDelegate.podspec +2 -2
  2. package/Libraries/Blob/React-RCTBlob.podspec +1 -1
  3. package/Libraries/Core/ReactNativeVersion.js +1 -1
  4. package/Libraries/Image/RCTImageLoader.mm +2 -6
  5. package/Libraries/Image/React-RCTImage.podspec +1 -1
  6. package/Libraries/LinkingIOS/React-RCTLinking.podspec +1 -1
  7. package/Libraries/NativeAnimation/React-RCTAnimation.podspec +1 -1
  8. package/Libraries/Network/RCTNetworkTask.mm +4 -3
  9. package/Libraries/Network/React-RCTNetwork.podspec +1 -1
  10. package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +1 -1
  11. package/Libraries/Settings/React-RCTSettings.podspec +1 -1
  12. package/Libraries/Text/React-RCTText.podspec +1 -1
  13. package/Libraries/Text/TextInput/RCTBaseTextInputView.mm +0 -13
  14. package/Libraries/TypeSafety/RCTTypeSafety.podspec +1 -1
  15. package/Libraries/Vibration/React-RCTVibration.podspec +1 -1
  16. package/React/Base/RCTVersion.m +1 -1
  17. package/React/CoreModules/React-CoreModules.podspec +1 -1
  18. package/React/React-RCTFabric.podspec +1 -1
  19. package/React/Views/RCTComponentData.m +11 -3
  20. package/React-Core.podspec +1 -1
  21. package/ReactAndroid/api/ReactAndroid.api +0 -9
  22. package/ReactAndroid/gradle.properties +1 -1
  23. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  24. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputKeyPressEvent.java +1 -1
  25. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +0 -5
  26. package/ReactApple/Libraries/RCTFoundation/RCTDeprecation/RCTDeprecation.podspec +1 -1
  27. package/ReactCommon/React-Fabric.podspec +1 -1
  28. package/ReactCommon/React-FabricImage.podspec +1 -1
  29. package/ReactCommon/React-Mapbuffer.podspec +1 -1
  30. package/ReactCommon/React-nativeconfig.podspec +1 -1
  31. package/ReactCommon/React-rncore.podspec +1 -1
  32. package/ReactCommon/ReactCommon.podspec +1 -1
  33. package/ReactCommon/cxxreact/React-cxxreact.podspec +1 -1
  34. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  35. package/ReactCommon/hermes/React-hermes.podspec +1 -1
  36. package/ReactCommon/hermes/executor/React-jsitracing.podspec +1 -1
  37. package/ReactCommon/jserrorhandler/React-jserrorhandler.podspec +1 -1
  38. package/ReactCommon/jsiexecutor/React-jsiexecutor.podspec +1 -1
  39. package/ReactCommon/jsinspector-modern/React-jsinspector.podspec +1 -1
  40. package/ReactCommon/react/debug/React-debug.podspec +1 -1
  41. package/ReactCommon/react/featureflags/React-featureflags.podspec +1 -1
  42. package/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +1 -1
  43. package/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec +1 -1
  44. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm +4 -3
  45. package/ReactCommon/react/renderer/debug/React-rendererdebug.podspec +1 -1
  46. package/ReactCommon/react/renderer/graphics/React-graphics.podspec +1 -1
  47. package/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec +1 -1
  48. package/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +1 -1
  49. package/ReactCommon/react/runtime/React-RuntimeCore.podspec +1 -1
  50. package/ReactCommon/react/runtime/React-RuntimeHermes.podspec +1 -1
  51. package/ReactCommon/react/runtime/platform/ios/React-RuntimeApple.podspec +1 -1
  52. package/ReactCommon/react/utils/React-utils.podspec +1 -1
  53. package/ReactCommon/reactperflogger/React-perflogger.podspec +1 -1
  54. package/package.json +8 -8
  55. package/scripts/cocoapods/helpers.rb +4 -0
  56. package/scripts/cocoapods/new_architecture.rb +10 -23
  57. package/scripts/cocoapods/privacy_manifest_utils.rb +11 -5
  58. package/scripts/cocoapods/utils.rb +12 -1
  59. package/scripts/react_native_pods.rb +4 -0
  60. package/scripts/react_native_pods_utils/script_phases.sh +1 -1
  61. package/sdks/hermes-engine/hermes-engine.podspec +2 -1
  62. package/sdks/hermes-engine/utils/build-apple-framework.sh +11 -5
  63. package/sdks/hermes-engine/utils/build-hermes-xcode.sh +11 -5
  64. package/sdks/hermes-engine/utils/build-ios-framework.sh +15 -5
  65. package/sdks/hermes-engine/utils/create-dummy-hermes-xcframework.sh +1 -1
  66. package/sdks/hermesc/osx-bin/hermes +0 -0
  67. package/sdks/hermesc/osx-bin/hermesc +0 -0
  68. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  69. package/template/package.json +5 -5
  70. package/third-party-podspecs/RCT-Folly.podspec +1 -1
  71. package/third-party-podspecs/fmt.podspec +1 -1
  72. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputEvent.java +0 -70
@@ -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: 3,
19
+ patch: 5,
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
@@ -493,8 +493,6 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame)
493
493
  }
494
494
  }
495
495
 
496
- NSString *previousText = [backedTextInputView.attributedText.string copy] ?: @"";
497
-
498
496
  if (range.location + range.length > backedTextInputView.attributedText.string.length) {
499
497
  _predictedText = backedTextInputView.attributedText.string;
500
498
  } else if (text != nil) {
@@ -502,17 +500,6 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame)
502
500
  withString:text];
503
501
  }
504
502
 
505
- if (_onTextInput) {
506
- _onTextInput(@{
507
- // We copy the string here because if it's a mutable string it may get released before we stop using it on a
508
- // different thread, causing a crash.
509
- @"text" : [text copy],
510
- @"previousText" : previousText,
511
- @"range" : @{@"start" : @(range.location), @"end" : @(range.location + range.length)},
512
- @"eventCount" : @(_nativeEventCount),
513
- });
514
- }
515
-
516
503
  return text; // Accepting the change.
517
504
  }
518
505
 
@@ -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: @(3),
26
+ RCTVersionPatch: @(5),
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"
@@ -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\""}
@@ -7362,15 +7362,6 @@ public class com/facebook/react/views/textinput/ReactTextChangedEvent : com/face
7362
7362
  public fun getEventName ()Ljava/lang/String;
7363
7363
  }
7364
7364
 
7365
- public class com/facebook/react/views/textinput/ReactTextInputEvent : com/facebook/react/uimanager/events/Event {
7366
- public static final field EVENT_NAME Ljava/lang/String;
7367
- public fun <init> (IILjava/lang/String;Ljava/lang/String;II)V
7368
- public fun <init> (ILjava/lang/String;Ljava/lang/String;II)V
7369
- public fun canCoalesce ()Z
7370
- protected fun getEventData ()Lcom/facebook/react/bridge/WritableMap;
7371
- public fun getEventName ()Ljava/lang/String;
7372
- }
7373
-
7374
7365
  public final class com/facebook/react/views/textinput/ReactTextInputLocalData {
7375
7366
  public fun <init> (Landroid/widget/EditText;)V
7376
7367
  public fun apply (Landroid/widget/EditText;)V
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.74.3
1
+ VERSION_NAME=0.74.5
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
 
4
4
  android.useAndroidX=true
@@ -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", 3,
20
+ "patch", 5,
21
21
  "prerelease", null);
22
22
  }
@@ -14,7 +14,7 @@ import com.facebook.react.uimanager.common.ViewUtil;
14
14
  import com.facebook.react.uimanager.events.Event;
15
15
 
16
16
  /** Event emitted by EditText native view when key pressed */
17
- class ReactTextInputKeyPressEvent extends Event<ReactTextInputEvent> {
17
+ /* package */ class ReactTextInputKeyPressEvent extends Event<ReactTextInputKeyPressEvent> {
18
18
 
19
19
  public static final String EVENT_NAME = "topKeyPress";
20
20
 
@@ -1122,17 +1122,12 @@ public class ReactTextInputManager extends BaseViewManager<ReactEditText, Layout
1122
1122
  }
1123
1123
 
1124
1124
  // The event that contains the event counter and updates it must be sent first.
1125
- // TODO: t7936714 merge these events
1126
1125
  mEventDispatcher.dispatchEvent(
1127
1126
  new ReactTextChangedEvent(
1128
1127
  mSurfaceId,
1129
1128
  mEditText.getId(),
1130
1129
  s.toString(),
1131
1130
  mEditText.incrementAndGetEventCounter()));
1132
-
1133
- mEventDispatcher.dispatchEvent(
1134
- new ReactTextInputEvent(
1135
- mSurfaceId, mEditText.getId(), newText, oldText, start, start + before));
1136
1131
  }
1137
1132
 
1138
1133
  @Override
@@ -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 = 3;
20
+ int32_t Patch = 5;
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']
@@ -36,7 +36,7 @@ Pod::Spec.new do |s|
36
36
  s.source_files = "JsErrorHandler.{cpp,h}"
37
37
  s.pod_target_xcconfig = {
38
38
  "USE_HEADERMAP" => "YES",
39
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20"
39
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard()
40
40
  }
41
41
  s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
42
42
 
@@ -33,7 +33,7 @@ Pod::Spec.new do |s|
33
33
  s.source_files = "jsireact/*.{cpp,h}"
34
34
  s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
35
35
  s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\"",
36
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20" }
36
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard() }
37
37
  s.header_dir = "jsireact"
38
38
 
39
39
  s.dependency "React-cxxreact", version
@@ -38,7 +38,7 @@ Pod::Spec.new do |s|
38
38
  s.compiler_flags = folly_compiler_flags
39
39
  s.pod_target_xcconfig = {
40
40
  "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\"",
41
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
41
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
42
42
  "DEFINES_MODULE" => "YES"
43
43
  }.merge!(use_frameworks ? {
44
44
  "PUBLIC_HEADERS_FOLDER_PATH" => "#{module_name}.framework/Headers/#{header_dir}"
@@ -27,7 +27,7 @@ Pod::Spec.new do |s|
27
27
  s.source = source
28
28
  s.source_files = "**/*.{cpp,h}"
29
29
  s.header_dir = "react/debug"
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
  "DEFINES_MODULE" => "YES" }
32
32
 
33
33
  if ENV['USE_FRAMEWORKS']
@@ -33,7 +33,7 @@ Pod::Spec.new do |s|
33
33
  s.source = source
34
34
  s.source_files = "*.{cpp,h}"
35
35
  s.header_dir = "react/featureflags"
36
- s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
36
+ s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
37
37
  "HEADER_SEARCH_PATHS" => header_search_paths.join(' '),
38
38
  "DEFINES_MODULE" => "YES" }
39
39
 
@@ -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 = { "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
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
39
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
40
40
  "GCC_WARN_PEDANTIC" => "YES" }
41
41
  if ENV['USE_FRAMEWORKS']
42
42
  s.header_mappings_dir = './'
@@ -47,7 +47,7 @@ Pod::Spec.new do |s|
47
47
  s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
48
48
  s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => header_search_paths,
49
49
  "USE_HEADERMAP" => "YES",
50
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
50
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
51
51
  "GCC_WARN_PEDANTIC" => "YES" }
52
52
  if ENV['USE_FRAMEWORKS']
53
53
  s.header_mappings_dir = './'
@@ -125,9 +125,10 @@ static const std::shared_ptr<void> constructCoordinator(
125
125
  bridgeModuleDecorator = unwrapManagedObject(optionalModuleDecorator.value());
126
126
  }
127
127
 
128
- RCTComponentData *componentData = [[RCTComponentData alloc] initWithManagerClass:viewManagerClass
129
- bridge:bridge
130
- eventDispatcher:eventDispatcher];
128
+ RCTComponentData *componentData =
129
+ [[RCTComponentData alloc] initWithManagerClass:viewManagerClass
130
+ bridge:bridge != nil ? bridge : (RCTBridge *)bridgeProxy
131
+ eventDispatcher:eventDispatcher];
131
132
  return wrapManagedObject([[RCTLegacyViewManagerInteropCoordinator alloc]
132
133
  initWithComponentData:componentData
133
134
  bridge:bridge
@@ -45,7 +45,7 @@ Pod::Spec.new do |s|
45
45
  s.header_dir = "react/renderer/debug"
46
46
  s.exclude_files = "tests"
47
47
  s.pod_target_xcconfig = {
48
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
48
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
49
49
  "HEADER_SEARCH_PATHS" => header_search_paths.join(' '),
50
50
  "DEFINES_MODULE" => "YES"
51
51
  }
@@ -57,7 +57,7 @@ Pod::Spec.new do |s|
57
57
  s.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
58
58
  "HEADER_SEARCH_PATHS" => header_search_paths.join(" "),
59
59
  "DEFINES_MODULE" => "YES",
60
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20" }
60
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard() }
61
61
 
62
62
  s.dependency "glog"
63
63
  s.dependency "RCT-Folly/Fabric", folly_version
@@ -50,7 +50,7 @@ Pod::Spec.new do |s|
50
50
  s.pod_target_xcconfig = {
51
51
  "USE_HEADERMAP" => "NO",
52
52
  "HEADER_SEARCH_PATHS" => header_search_paths,
53
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
53
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
54
54
  "DEFINES_MODULE" => "YES",
55
55
  }
56
56
 
@@ -43,7 +43,7 @@ Pod::Spec.new do |s|
43
43
  s.header_dir = "react/renderer/runtimescheduler"
44
44
  s.exclude_files = "tests"
45
45
  s.pod_target_xcconfig = {
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
  if ENV['USE_FRAMEWORKS']
@@ -37,7 +37,7 @@ Pod::Spec.new do |s|
37
37
  s.header_dir = "react/runtime"
38
38
  s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/Headers/Private/React-Core\" \"${PODS_TARGET_SRCROOT}/../..\"",
39
39
  "USE_HEADERMAP" => "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
  s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
43
43
 
@@ -35,7 +35,7 @@ Pod::Spec.new do |s|
35
35
  s.header_dir = "react/runtime/hermes"
36
36
  s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"${PODS_TARGET_SRCROOT}/../..\" \"${PODS_TARGET_SRCROOT}/../../hermes/executor\" \"$(PODS_ROOT)/boost\"",
37
37
  "USE_HEADERMAP" => "YES",
38
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
38
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
39
39
  "GCC_WARN_PEDANTIC" => "YES" }
40
40
  s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
41
41
 
@@ -42,7 +42,7 @@ Pod::Spec.new do |s|
42
42
  s.header_dir = "ReactCommon"
43
43
  s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => header_search_paths,
44
44
  "USE_HEADERMAP" => "YES",
45
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
45
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
46
46
  "GCC_WARN_PEDANTIC" => "YES" }
47
47
  s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
48
48
 
@@ -39,7 +39,7 @@ Pod::Spec.new do |s|
39
39
  s.compiler_flags = folly_compiler_flags
40
40
  s.header_dir = "react/utils"
41
41
  s.exclude_files = "tests"
42
- s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
42
+ s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
43
43
  "HEADER_SEARCH_PATHS" => header_search_paths.join(' '),
44
44
  "DEFINES_MODULE" => "YES" }
45
45
 
@@ -32,5 +32,5 @@ Pod::Spec.new do |s|
32
32
  s.source = source
33
33
  s.source_files = "**/*.{cpp,h}"
34
34
  s.header_dir = "reactperflogger"
35
- s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++20" }
35
+ s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard() }
36
36
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native",
3
- "version": "0.74.3",
3
+ "version": "0.74.5",
4
4
  "description": "A framework for building native apps using React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -110,13 +110,13 @@
110
110
  "@react-native-community/cli": "13.6.9",
111
111
  "@react-native-community/cli-platform-android": "13.6.9",
112
112
  "@react-native-community/cli-platform-ios": "13.6.9",
113
- "@react-native/assets-registry": "0.74.85",
114
- "@react-native/codegen": "0.74.85",
115
- "@react-native/community-cli-plugin": "0.74.85",
116
- "@react-native/gradle-plugin": "0.74.85",
117
- "@react-native/js-polyfills": "0.74.85",
118
- "@react-native/normalize-colors": "0.74.85",
119
- "@react-native/virtualized-lists": "0.74.85",
113
+ "@react-native/assets-registry": "0.74.87",
114
+ "@react-native/codegen": "0.74.87",
115
+ "@react-native/community-cli-plugin": "0.74.87",
116
+ "@react-native/gradle-plugin": "0.74.87",
117
+ "@react-native/js-polyfills": "0.74.87",
118
+ "@react-native/normalize-colors": "0.74.87",
119
+ "@react-native/virtualized-lists": "0.74.87",
120
120
  "abort-controller": "^3.0.0",
121
121
  "anser": "^1.4.9",
122
122
  "ansi-regex": "^5.0.0",
@@ -51,5 +51,9 @@ module Helpers
51
51
  :compiler_flags => '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
52
52
  }
53
53
  end
54
+
55
+ def self.cxx_language_standard
56
+ return "c++20"
57
+ end
54
58
  end
55
59
  end
@@ -9,34 +9,21 @@ require_relative "./utils.rb"
9
9
  require_relative "./helpers.rb"
10
10
 
11
11
  class NewArchitectureHelper
12
- @@cplusplus_version = "c++20"
13
-
14
12
  @@NewArchWarningEmitted = false # Used not to spam warnings to the user.
15
13
 
16
14
  def self.set_clang_cxx_language_standard_if_needed(installer)
17
- language_standard = nil
18
-
19
- installer.pods_project.targets.each do |target|
20
- # The React-Core pod may have a suffix added by Cocoapods, so we test whether 'React-Core' is a substring, and do not require exact match
21
- if target.name.include? 'React-Core'
22
- language_standard = target.resolved_build_setting("CLANG_CXX_LANGUAGE_STANDARD", resolve_against_xcconfig: true).values[0]
23
- end
24
- end
15
+ projects = installer.aggregate_targets
16
+ .map{ |t| t.user_project }
17
+ .uniq{ |p| p.path }
25
18
 
26
- unless language_standard.nil?
27
- projects = installer.aggregate_targets
28
- .map{ |t| t.user_project }
29
- .uniq{ |p| p.path }
19
+ projects.each do |project|
20
+ Pod::UI.puts("Setting CLANG_CXX_LANGUAGE_STANDARD to #{ Helpers::Constants::cxx_language_standard } on #{ project.path }")
30
21
 
31
- projects.each do |project|
32
- Pod::UI.puts("Setting CLANG_CXX_LANGUAGE_STANDARD to #{ language_standard } on #{ project.path }")
33
-
34
- project.build_configurations.each do |config|
35
- config.build_settings["CLANG_CXX_LANGUAGE_STANDARD"] = language_standard
36
- end
37
-
38
- project.save()
22
+ project.build_configurations.each do |config|
23
+ config.build_settings["CLANG_CXX_LANGUAGE_STANDARD"] = Helpers::Constants::cxx_language_standard
39
24
  end
25
+
26
+ project.save()
40
27
  end
41
28
  end
42
29
 
@@ -103,7 +90,7 @@ class NewArchitectureHelper
103
90
  current_config["HEADER_SEARCH_PATHS"] = current_headers.empty? ?
104
91
  header_search_paths_string :
105
92
  "#{current_headers} #{header_search_paths_string}"
106
- current_config["CLANG_CXX_LANGUAGE_STANDARD"] = @@cplusplus_version
93
+ current_config["CLANG_CXX_LANGUAGE_STANDARD"] = Helpers::Constants::cxx_language_standard
107
94
 
108
95
 
109
96
  spec.dependency "React-Core"
@@ -50,7 +50,7 @@ module PrivacyManifestUtils
50
50
  end
51
51
 
52
52
  def self.get_application_targets(user_project)
53
- return user_project.targets.filter { |t| t.symbol_type == :application }
53
+ return user_project.targets.filter { |t| t.respond_to?(:symbol_type) && t.symbol_type == :application }
54
54
  end
55
55
 
56
56
  def self.read_privacyinfo_file(file_path)
@@ -67,7 +67,7 @@ module PrivacyManifestUtils
67
67
  end
68
68
 
69
69
  def self.ensure_reference(file_path, user_project, target)
70
- reference_exists = target.resources_build_phase.files_references.any? { |file_ref| file_ref.path&.end_with? "PrivacyInfo.xcprivacy" }
70
+ reference_exists = target.resources_build_phase.files_references.any? { |file_ref| file_ref&.path&.end_with? "PrivacyInfo.xcprivacy" }
71
71
  unless reference_exists
72
72
  # We try to find the main group, but if it doesn't exist, we default to adding the file to the project root – both work
73
73
  file_root = user_project.root_object.main_group.children.find { |group|
@@ -79,8 +79,11 @@ module PrivacyManifestUtils
79
79
  end
80
80
 
81
81
  def self.get_privacyinfo_file_path(user_project, targets)
82
+
82
83
  file_refs = targets.flat_map { |target| target.resources_build_phase.files_references }
83
- existing_file = file_refs.find { |file_ref| file_ref.path&.end_with? "PrivacyInfo.xcprivacy" }
84
+ existing_file = file_refs.find { |file_ref| file_ref&.path&.end_with?("PrivacyInfo.xcprivacy") }
85
+
86
+
84
87
  if existing_file
85
88
  return existing_file.real_path
86
89
  end
@@ -89,7 +92,9 @@ module PrivacyManifestUtils
89
92
  info_plist_path = user_project.files.find { |file_ref| file_ref.name == "Info.plist" }
90
93
  if info_plist_path.nil?
91
94
  # return path that is sibling to .xcodeproj
95
+
92
96
  path = user_project.path
97
+
93
98
  return File.join(File.dirname(path), "PrivacyInfo.xcprivacy")
94
99
  end
95
100
  return File.join(File.dirname(info_plist_path.real_path),"PrivacyInfo.xcprivacy")
@@ -120,6 +125,7 @@ module PrivacyManifestUtils
120
125
  end
121
126
  end
122
127
  end
128
+
123
129
  return used_apis
124
130
  end
125
131
 
@@ -127,7 +133,7 @@ module PrivacyManifestUtils
127
133
  privacy_manifests = user_project
128
134
  .files
129
135
  .select { |p|
130
- p.path&.end_with?('PrivacyInfo.xcprivacy')
136
+ p&.path&.end_with?('PrivacyInfo.xcprivacy')
131
137
  }
132
138
  return privacy_manifests
133
139
  end
@@ -165,7 +171,7 @@ module PrivacyManifestUtils
165
171
  "NSPrivacyTracking" => false,
166
172
  "NSPrivacyAccessedAPITypes" => get_core_accessed_apis
167
173
  }
168
- path = File.join(user_project.path.parent, "PrivacyInfo.xcprivacy")
174
+ path = File.join(user_project&.path.parent, "PrivacyInfo.xcprivacy")
169
175
  Xcodeproj::Plist.write_to_path(privacy_manifest, path)
170
176
  Pod::UI.puts "Your app does not have a privacy manifest! A template has been generated containing Required Reasons API usage in the core React Native library. Please add the PrivacyInfo.xcprivacy file to your project and complete data use, tracking and any additional required reasons your app is using according to Apple's guidance: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files. Then, you will need to manually add this file to your project in Xcode.".red
171
177
  end
@@ -244,7 +244,18 @@ class ReactNativePodsUtils
244
244
  end
245
245
 
246
246
  if !file_manager.exist?("#{file_path}.local")
247
- node_binary = `command -v node`
247
+ # When installing pods with a yarn alias, yarn creates a fake yarn and node executables
248
+ # in a temporary folder.
249
+ # Using `type -a` we are able to retrieve all the paths of an executable and we can
250
+ # exclude the temporary ones.
251
+ # see https://github.com/facebook/react-native/issues/43285 for more info
252
+ node_binary = `type -a node`.split("\n").map { |path|
253
+ path.gsub!("node is ", "")
254
+ }.select { |b|
255
+ return !b.start_with?("/var")
256
+ }
257
+
258
+ node_binary = node_binary[0]
248
259
  system("echo 'export NODE_BINARY=#{node_binary}' > #{file_path}.local")
249
260
  end
250
261
  end
@@ -262,6 +262,10 @@ def get_folly_config()
262
262
  return Helpers::Constants.folly_config
263
263
  end
264
264
 
265
+ def rct_cxx_language_standard()
266
+ return Helpers::Constants.cxx_language_standard
267
+ end
268
+
265
269
  # Function that executes after React Native has been installed to configure some flags and build settings.
266
270
  #
267
271
  # Parameters
@@ -104,7 +104,7 @@ moveOutputs () {
104
104
  mkdir -p "$RCT_SCRIPT_OUTPUT_DIR"
105
105
 
106
106
  # Copy all output to output_dir
107
- cp -R -X "$TEMP_OUTPUT_DIR/." "$RCT_SCRIPT_OUTPUT_DIR" || exit 1
107
+ /bin/cp -R -X "$TEMP_OUTPUT_DIR/." "$RCT_SCRIPT_OUTPUT_DIR" || exit 1
108
108
  echo "$LIBRARY_NAME output has been written to $RCT_SCRIPT_OUTPUT_DIR:" >> "${SCRIPT_OUTPUT_FILE_0}" 2>&1
109
109
  ls -1 "$RCT_SCRIPT_OUTPUT_DIR" >> "${SCRIPT_OUTPUT_FILE_0}" 2>&1
110
110
  }
@@ -24,7 +24,7 @@ Pod::Spec.new do |spec|
24
24
  spec.license = package['license']
25
25
  spec.author = "Facebook"
26
26
  spec.source = source
27
- spec.platforms = { :osx => "10.13", :ios => "13.4" }
27
+ spec.platforms = { :osx => "10.13", :ios => "13.4", :visionos => "1.0" }
28
28
 
29
29
  spec.preserve_paths = '**/*.*'
30
30
  spec.source_files = ''
@@ -44,6 +44,7 @@ Pod::Spec.new do |spec|
44
44
  ss.source_files = "destroot/include/hermes/**/*.h"
45
45
  ss.header_mappings_dir = "destroot/include"
46
46
  ss.ios.vendored_frameworks = "destroot/Library/Frameworks/universal/hermes.xcframework"
47
+ ss.visionos.vendored_frameworks = "destroot/Library/Frameworks/universal/hermes.xcframework"
47
48
  ss.osx.vendored_frameworks = "destroot/Library/Frameworks/macosx/hermes.framework"
48
49
  end
49
50
 
@@ -17,6 +17,8 @@ REACT_NATIVE_PATH=${REACT_NATIVE_PATH:-$CURR_SCRIPT_DIR/../../..}
17
17
 
18
18
  NUM_CORES=$(sysctl -n hw.ncpu)
19
19
 
20
+ PLATFORMS=("macosx" "iphoneos" "iphonesimulator" "catalyst" "xros" "xrsimulator")
21
+
20
22
  if [[ -z "$JSI_PATH" ]]; then
21
23
  JSI_PATH="$REACT_NATIVE_PATH/ReactCommon/jsi"
22
24
  fi
@@ -37,6 +39,10 @@ function get_ios_deployment_target {
37
39
  use_env_var_or_ruby_prop "${IOS_DEPLOYMENT_TARGET}" "deployment_target('ios')"
38
40
  }
39
41
 
42
+ function get_visionos_deployment_target {
43
+ use_env_var_or_ruby_prop "${XROS_DEPLOYMENT_TARGET}" "deployment_target('visionos')"
44
+ }
45
+
40
46
  function get_mac_deployment_target {
41
47
  use_env_var_or_ruby_prop "${MAC_DEPLOYMENT_TARGET}" "deployment_target('osx')"
42
48
  }
@@ -147,12 +153,12 @@ function build_apple_framework {
147
153
  }
148
154
 
149
155
  function prepare_dest_root_for_ci {
150
- mkdir -p "destroot/Library/Frameworks/macosx" "destroot/bin" "destroot/Library/Frameworks/iphoneos" "destroot/Library/Frameworks/iphonesimulator" "destroot/Library/Frameworks/catalyst"
156
+ mkdir -p "destroot/bin"
157
+ for platform in "${PLATFORMS[@]}"; do
158
+ mkdir -p "destroot/Library/Frameworks/$platform"
159
+ cp -R "./build_$platform/API/hermes/hermes.framework"* "destroot/Library/Frameworks/$platform"
160
+ done
151
161
 
152
- cp -R "./build_macosx/API/hermes/hermes.framework"* "destroot/Library/Frameworks/macosx"
153
- cp -R "./build_iphoneos/API/hermes/hermes.framework"* "destroot/Library/Frameworks/iphoneos"
154
- cp -R "./build_iphonesimulator/API/hermes/hermes.framework"* "destroot/Library/Frameworks/iphonesimulator"
155
- cp -R "./build_catalyst/API/hermes/hermes.framework"* "destroot/Library/Frameworks/catalyst"
156
162
  cp "./build_macosx/bin/"* "destroot/bin"
157
163
 
158
164
  # Copy over Hermes and JSI API headers.
@@ -10,24 +10,30 @@ release_version="$1"; shift
10
10
  hermesc_path="$1"; shift
11
11
  jsi_path="$1"; shift
12
12
 
13
- # Based on platform name returns the framework copy destination. Used later by `vendored_frameworks` in Podspec.
13
+ # Based on platform name returns the framework copy destination. Used later by `vendored_frameworks` in Podspec.
14
14
  # Fallbacks to "ios" if platform is not recognized.
15
15
  function get_platform_copy_destination {
16
16
  if [[ $1 == "macosx" ]]; then
17
17
  echo "macosx"
18
18
  return
19
+ elif [[ $1 == "xros" || $1 == "xrsimulator" ]]; then
20
+ echo "xros"
21
+ return
19
22
  fi
20
-
23
+
21
24
  echo "ios"
22
25
  }
23
26
 
24
27
  function get_deployment_target {
25
28
  if [[ $1 == "macosx" ]]; then
26
- echo ${MACOSX_DEPLOYMENT_TARGET}
29
+ echo "${MACOSX_DEPLOYMENT_TARGET}"
30
+ return
31
+ elif [[ $1 == "xrsimulator" || $1 == "xros" ]]; then
32
+ echo "${XROS_DEPLOYMENT_TARGET}"
27
33
  return
28
34
  fi
29
-
30
- echo ${IPHONEOS_DEPLOYMENT_TARGET}
35
+
36
+ echo "${IPHONEOS_DEPLOYMENT_TARGET}"
31
37
  }
32
38
 
33
39
  enable_debugger="false"
@@ -10,9 +10,9 @@ fi
10
10
  set -e
11
11
 
12
12
  # Given a specific target, retrieve the right architecture for it
13
- # $1 the target you want to build. Allowed values: iphoneos, iphonesimulator, catalyst
13
+ # $1 the target you want to build. Allowed values: iphoneos, iphonesimulator, catalyst, xros, xrsimulator
14
14
  function get_architecture {
15
- if [[ $1 == "iphoneos" ]]; then
15
+ if [[ $1 == "iphoneos" || $1 == "xros" || $1 == "xrsimulator" ]]; then
16
16
  echo "arm64"
17
17
  elif [[ $1 == "iphonesimulator" ]]; then
18
18
  echo "x86_64;arm64"
@@ -24,15 +24,23 @@ function get_architecture {
24
24
  fi
25
25
  }
26
26
 
27
+ function get_deployment_target {
28
+ if [[ $1 == "xros" || $1 == "xrsimulator" ]]; then
29
+ echo "$(get_visionos_deployment_target)"
30
+ else
31
+ echo "$(get_ios_deployment_target)"
32
+ fi
33
+ }
34
+
27
35
  # build a single framework
28
36
  # $1 is the target to build
29
37
  function build_framework {
30
38
  if [ ! -d destroot/Library/Frameworks/universal/hermes.xcframework ]; then
31
- ios_deployment_target=$(get_ios_deployment_target)
39
+ deployment_target=$(get_deployment_target "$1")
32
40
 
33
41
  architecture=$(get_architecture "$1")
34
42
 
35
- build_apple_framework "$1" "$architecture" "$ios_deployment_target"
43
+ build_apple_framework "$1" "$architecture" "$deployment_target"
36
44
  else
37
45
  echo "Skipping; Clean \"destroot\" to rebuild".
38
46
  fi
@@ -41,7 +49,7 @@ function build_framework {
41
49
  # group the frameworks together to create a universal framework
42
50
  function build_universal_framework {
43
51
  if [ ! -d destroot/Library/Frameworks/universal/hermes.xcframework ]; then
44
- create_universal_framework "iphoneos" "iphonesimulator" "catalyst"
52
+ create_universal_framework "iphoneos" "iphonesimulator" "catalyst" "xros" "xrsimulator"
45
53
  else
46
54
  echo "Skipping; Clean \"destroot\" to rebuild".
47
55
  fi
@@ -56,6 +64,8 @@ function create_framework {
56
64
  build_framework "iphoneos"
57
65
  build_framework "iphonesimulator"
58
66
  build_framework "catalyst"
67
+ build_framework "xros"
68
+ build_framework "xrsimulator"
59
69
 
60
70
  build_universal_framework
61
71
  else
@@ -19,7 +19,7 @@ pushd destroot/Library/Frameworks > /dev/null || exit 1
19
19
 
20
20
  echo '' > dummy.c
21
21
 
22
- platforms=( "macosx" "ios" ) # Add other platforms here if needed
22
+ platforms=( "macosx" "ios" "xros" ) # Add other platforms here if needed
23
23
 
24
24
  for platform in "${platforms[@]}"
25
25
  do
Binary file
Binary file
Binary file
@@ -11,16 +11,16 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "react": "18.2.0",
14
- "react-native": "0.74.3"
14
+ "react-native": "0.74.5"
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.74.85",
21
- "@react-native/eslint-config": "0.74.85",
22
- "@react-native/metro-config": "0.74.85",
23
- "@react-native/typescript-config": "0.74.85",
20
+ "@react-native/babel-preset": "0.74.87",
21
+ "@react-native/eslint-config": "0.74.87",
22
+ "@react-native/metro-config": "0.74.87",
23
+ "@react-native/typescript-config": "0.74.87",
24
24
  "@types/react": "^18.2.6",
25
25
  "@types/react-test-renderer": "^18.0.0",
26
26
  "babel-jest": "^29.6.3",
@@ -82,7 +82,7 @@ Pod::Spec.new do |spec|
82
82
  spec.libraries = "c++abi" # NOTE Apple-only: Keep c++abi here due to https://github.com/react-native-community/releases/issues/251
83
83
  spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
84
84
  "DEFINES_MODULE" => "YES",
85
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
85
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
86
86
  "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\"",
87
87
  # In dynamic framework (use_frameworks!) mode, ignore the unused and undefined boost symbols when generating the library.
88
88
  "OTHER_LDFLAGS" => "\"-Wl,-U,_jump_fcontext\" \"-Wl,-U,_make_fcontext\""
@@ -15,7 +15,7 @@ Pod::Spec.new do |spec|
15
15
  :tag => "9.1.0"
16
16
  }
17
17
  spec.pod_target_xcconfig = {
18
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
18
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
19
19
  }
20
20
  spec.platforms = min_supported_versions
21
21
  spec.libraries = "c++"
@@ -1,70 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- package com.facebook.react.views.textinput;
9
-
10
- import androidx.annotation.Nullable;
11
- import com.facebook.react.bridge.Arguments;
12
- import com.facebook.react.bridge.WritableMap;
13
- import com.facebook.react.uimanager.common.ViewUtil;
14
- import com.facebook.react.uimanager.events.Event;
15
-
16
- /**
17
- * Event emitted by EditText native view when text changes. VisibleForTesting from {@link
18
- * TextInputEventsTestCase}.
19
- */
20
- public class ReactTextInputEvent extends Event<ReactTextInputEvent> {
21
-
22
- public static final String EVENT_NAME = "topTextInput";
23
-
24
- private String mText;
25
- private String mPreviousText;
26
- private int mRangeStart;
27
- private int mRangeEnd;
28
-
29
- @Deprecated
30
- public ReactTextInputEvent(
31
- int viewId, String text, String previousText, int rangeStart, int rangeEnd) {
32
- this(ViewUtil.NO_SURFACE_ID, viewId, text, previousText, rangeStart, rangeEnd);
33
- }
34
-
35
- public ReactTextInputEvent(
36
- int surfaceId, int viewId, String text, String previousText, int rangeStart, int rangeEnd) {
37
- super(surfaceId, viewId);
38
- mText = text;
39
- mPreviousText = previousText;
40
- mRangeStart = rangeStart;
41
- mRangeEnd = rangeEnd;
42
- }
43
-
44
- @Override
45
- public String getEventName() {
46
- return EVENT_NAME;
47
- }
48
-
49
- @Override
50
- public boolean canCoalesce() {
51
- // We don't want to miss any textinput event, as event data is incremental.
52
- return false;
53
- }
54
-
55
- @Nullable
56
- @Override
57
- protected WritableMap getEventData() {
58
- WritableMap eventData = Arguments.createMap();
59
- WritableMap range = Arguments.createMap();
60
- range.putDouble("start", mRangeStart);
61
- range.putDouble("end", mRangeEnd);
62
-
63
- eventData.putString("text", mText);
64
- eventData.putString("previousText", mPreviousText);
65
- eventData.putMap("range", range);
66
-
67
- eventData.putInt("target", getViewTag());
68
- return eventData;
69
- }
70
- }