react-native 0.74.0-rc.8 → 0.74.0

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.
@@ -17,7 +17,7 @@ const version: $ReadOnly<{
17
17
  major: 0,
18
18
  minor: 74,
19
19
  patch: 0,
20
- prerelease: 'rc.8',
20
+ prerelease: null,
21
21
  };
22
22
 
23
23
  module.exports = {version};
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(74),
26
26
  RCTVersionPatch: @(0),
27
- RCTVersionPrerelease: @"rc.8",
27
+ RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -396,7 +396,7 @@ RCT_EXPORT_METHOD(show)
396
396
  ? UIAlertControllerStyleActionSheet
397
397
  : UIAlertControllerStyleAlert;
398
398
 
399
- NSString *devMenuType = self.bridge ? @"Bridge" : @"Bridgeless";
399
+ NSString *devMenuType = [self.bridge isKindOfClass:RCTBridge.class] ? @"Bridge" : @"Bridgeless";
400
400
  NSString *devMenuTitle = [NSString stringWithFormat:@"React Native Dev Menu (%@)", devMenuType];
401
401
 
402
402
  _actionSheet = [UIAlertController alertControllerWithTitle:devMenuTitle message:description preferredStyle:style];
@@ -158,6 +158,11 @@ RCT_EXPORT_MODULE()
158
158
  return NO;
159
159
  }
160
160
 
161
+ - (BOOL)_isBridgeMode
162
+ {
163
+ return [self.bridge isKindOfClass:[RCTBridge class]];
164
+ }
165
+
161
166
  - (instancetype)initWithDataSource:(id<RCTDevSettingsDataSource>)dataSource
162
167
  {
163
168
  if (self = [super init]) {
@@ -178,7 +183,7 @@ RCT_EXPORT_MODULE()
178
183
  - (void)initialize
179
184
  {
180
185
  #if RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION
181
- if (self.bridge) {
186
+ if ([self _isBridgeMode]) {
182
187
  RCTBridge *__weak weakBridge = self.bridge;
183
188
  _bridgeExecutorOverrideToken = [[RCTPackagerConnection sharedPackagerConnection]
184
189
  addNotificationHandler:^(id params) {
@@ -209,7 +214,7 @@ RCT_EXPORT_MODULE()
209
214
  #endif
210
215
 
211
216
  #if RCT_ENABLE_INSPECTOR
212
- if (self.bridge) {
217
+ if ([self _isBridgeMode]) {
213
218
  // We need this dispatch to the main thread because the bridge is not yet
214
219
  // finished with its initialisation. By the time it relinquishes control of
215
220
  // the main thread, this operation can be performed.
@@ -250,7 +255,7 @@ RCT_EXPORT_MODULE()
250
255
  {
251
256
  [super invalidate];
252
257
  #if RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION
253
- if (self.bridge) {
258
+ if ([self _isBridgeMode]) {
254
259
  [[RCTPackagerConnection sharedPackagerConnection] removeHandler:_bridgeExecutorOverrideToken];
255
260
  }
256
261
 
@@ -281,7 +286,7 @@ RCT_EXPORT_MODULE()
281
286
  - (BOOL)isDeviceDebuggingAvailable
282
287
  {
283
288
  #if RCT_ENABLE_INSPECTOR
284
- if (self.bridge) {
289
+ if ([self _isBridgeMode]) {
285
290
  return self.bridge.isInspectable;
286
291
  } else {
287
292
  return self.isInspectable;
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.74.0-rc.8
1
+ VERSION_NAME=0.74.0
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
 
4
4
  android.useAndroidX=true
@@ -18,5 +18,5 @@ public class ReactNativeVersion {
18
18
  "major", 0,
19
19
  "minor", 74,
20
20
  "patch", 0,
21
- "prerelease", "rc.8");
21
+ "prerelease", null);
22
22
  }
@@ -145,12 +145,12 @@ public class BridgelessCatalystInstance(private val reactHost: ReactHostImpl) :
145
145
  }
146
146
 
147
147
  @Deprecated(message = "This API is unsupported in the New Architecture.")
148
- override fun getJavaScriptContextHolder(): JavaScriptContextHolder {
149
- throw UnsupportedOperationException("Unimplemented method 'getJavaScriptContextHolder'")
148
+ override fun getJavaScriptContextHolder(): JavaScriptContextHolder? {
149
+ return reactHost.getJavaScriptContextHolder()
150
150
  }
151
151
 
152
- override fun getRuntimeExecutor(): RuntimeExecutor {
153
- throw UnsupportedOperationException("Unimplemented method 'getRuntimeExecutor'")
152
+ override fun getRuntimeExecutor(): RuntimeExecutor? {
153
+ return reactHost.getRuntimeExecutor()
154
154
  }
155
155
 
156
156
  override fun getRuntimeScheduler(): RuntimeScheduler {
@@ -18,7 +18,7 @@ constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 74;
20
20
  int32_t Patch = 0;
21
- std::string_view Prerelease = "rc.8";
21
+ std::string_view Prerelease = "";
22
22
  } ReactNativeVersion;
23
23
 
24
24
  } // namespace facebook::react
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native",
3
- "version": "0.74.0-rc.8",
3
+ "version": "0.74.0",
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.4",
111
111
  "@react-native-community/cli-platform-android": "13.6.4",
112
112
  "@react-native-community/cli-platform-ios": "13.6.4",
113
- "@react-native/assets-registry": "0.74.79",
114
- "@react-native/codegen": "0.74.79",
115
- "@react-native/community-cli-plugin": "0.74.79",
116
- "@react-native/gradle-plugin": "0.74.79",
117
- "@react-native/js-polyfills": "0.74.79",
118
- "@react-native/normalize-colors": "0.74.79",
119
- "@react-native/virtualized-lists": "0.74.79",
113
+ "@react-native/assets-registry": "0.74.81",
114
+ "@react-native/codegen": "0.74.81",
115
+ "@react-native/community-cli-plugin": "0.74.81",
116
+ "@react-native/gradle-plugin": "0.74.81",
117
+ "@react-native/js-polyfills": "0.74.81",
118
+ "@react-native/normalize-colors": "0.74.81",
119
+ "@react-native/virtualized-lists": "0.74.81",
120
120
  "abort-controller": "^3.0.0",
121
121
  "anser": "^1.4.9",
122
122
  "ansi-regex": "^5.0.0",
@@ -98,11 +98,12 @@ class ReactNativePodsUtils
98
98
  Pod::UI.puts("#{message_prefix}: Ccache found at #{ccache_path}")
99
99
  end
100
100
 
101
+ # Using scripts wrapping the ccache executable, to allow injection of configurations
102
+ ccache_clang_sh = File.join("$(REACT_NATIVE_PATH)", 'scripts', 'xcode', 'ccache-clang.sh')
103
+ ccache_clangpp_sh = File.join("$(REACT_NATIVE_PATH)", 'scripts', 'xcode', 'ccache-clang++.sh')
104
+
101
105
  if ccache_available and ccache_enabled
102
106
  Pod::UI.puts("#{message_prefix}: Setting CC, LD, CXX & LDPLUSPLUS build settings")
103
- # Using scripts wrapping the ccache executable, to allow injection of configurations
104
- ccache_clang_sh = File.join("$(REACT_NATIVE_PATH)", 'scripts', 'xcode', 'ccache-clang.sh')
105
- ccache_clangpp_sh = File.join("$(REACT_NATIVE_PATH)", 'scripts', 'xcode', 'ccache-clang++.sh')
106
107
 
107
108
  projects.each do |project|
108
109
  project.build_configurations.each do |config|
@@ -119,6 +120,20 @@ class ReactNativePodsUtils
119
120
  Pod::UI.puts("#{message_prefix}: Pass ':ccache_enabled => true' to 'react_native_post_install' in your Podfile or set environment variable 'USE_CCACHE=1' to increase the speed of subsequent builds")
120
121
  elsif !ccache_available and ccache_enabled
121
122
  Pod::UI.warn("#{message_prefix}: Install ccache or ensure your neither passing ':ccache_enabled => true' nor setting environment variable 'USE_CCACHE=1'")
123
+ else
124
+ Pod::UI.puts("#{message_prefix}: Removing Ccache from CC, LD, CXX & LDPLUSPLUS build settings")
125
+
126
+ projects.each do |project|
127
+ project.build_configurations.each do |config|
128
+ # Using the un-qualified names means you can swap in different implementations, for example ccache
129
+ config.build_settings["CC"] = config.build_settings["CC"] ? config.build_settings["CC"].gsub(/#{Regexp.escape(ccache_clang_sh)}/, '') : ""
130
+ config.build_settings["LD"] = config.build_settings["LD"] ? config.build_settings["LD"].gsub(/#{Regexp.escape(ccache_clang_sh)}/, "") : ""
131
+ config.build_settings["CXX"] = config.build_settings["CXX"] ? config.build_settings["CXX"].gsub(/#{Regexp.escape(ccache_clangpp_sh)}/, "") : ""
132
+ config.build_settings["LDPLUSPLUS"] = config.build_settings["LDPLUSPLUS"] ? config.build_settings["LDPLUSPLUS"].gsub(/#{Regexp.escape(ccache_clangpp_sh)}/, "") : ""
133
+ end
134
+
135
+ project.save()
136
+ end
122
137
  end
123
138
  end
124
139
 
@@ -576,6 +591,44 @@ class ReactNativePodsUtils
576
591
  ReactNativePodsUtils.update_header_paths_if_depends_on(target_installation_result, "React-ImageManager", header_search_paths)
577
592
  end
578
593
 
594
+ def self.get_privacy_manifest_paths_from(user_project)
595
+ privacy_manifests = user_project
596
+ .files
597
+ .select { |p|
598
+ p.path&.end_with?('PrivacyInfo.xcprivacy')
599
+ }
600
+ return privacy_manifests
601
+ end
602
+
603
+ def self.add_privacy_manifest_if_needed(installer)
604
+ user_project = installer.aggregate_targets
605
+ .map{ |t| t.user_project }
606
+ .first
607
+ privacy_manifest = self.get_privacy_manifest_paths_from(user_project).first
608
+ if privacy_manifest.nil?
609
+ file_timestamp_reason = {
610
+ "NSPrivacyAccessedAPIType" => "NSPrivacyAccessedAPICategoryFileTimestamp",
611
+ "NSPrivacyAccessedAPITypeReasons" => ["C617.1"],
612
+ }
613
+ user_defaults_reason = {
614
+ "NSPrivacyAccessedAPIType" => "NSPrivacyAccessedAPICategoryUserDefaults",
615
+ "NSPrivacyAccessedAPITypeReasons" => ["CA92.1"],
616
+ }
617
+ boot_time_reason = {
618
+ "NSPrivacyAccessedAPIType" => "NSPrivacyAccessedAPICategorySystemBootTime",
619
+ "NSPrivacyAccessedAPITypeReasons" => ["35F9.1"],
620
+ }
621
+ privacy_manifest = {
622
+ "NSPrivacyCollectedDataTypes" => [],
623
+ "NSPrivacyTracking" => false,
624
+ "NSPrivacyAccessedAPITypes" => [file_timestamp_reason, user_defaults_reason, boot_time_reason]
625
+ }
626
+ path = File.join(user_project.path.parent, "PrivacyInfo.xcprivacy")
627
+ Xcodeproj::Plist.write_to_path(privacy_manifest, path)
628
+ 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/.../privacy_manifest_files. Then, you will need to manually add this file to your project in Xcode.".red
629
+ end
630
+ end
631
+
579
632
  def self.react_native_pods
580
633
  return [
581
634
  "DoubleConversion",
@@ -292,6 +292,7 @@ def react_native_post_install(
292
292
  ReactNativePodsUtils.updateOSDeploymentTarget(installer)
293
293
  ReactNativePodsUtils.set_dynamic_frameworks_flags(installer)
294
294
  ReactNativePodsUtils.add_ndebug_flag_to_pods_in_release(installer)
295
+ ReactNativePodsUtils.add_privacy_manifest_if_needed(installer)
295
296
 
296
297
  NewArchitectureHelper.set_clang_cxx_language_standard_if_needed(installer)
297
298
  NewArchitectureHelper.modify_flags_for_new_architecture(installer, NewArchitectureHelper.new_arch_enabled)
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.0-rc.8"
14
+ "react-native": "0.74.0"
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.79",
21
- "@react-native/eslint-config": "0.74.79",
22
- "@react-native/metro-config": "0.74.79",
23
- "@react-native/typescript-config": "0.74.79",
20
+ "@react-native/babel-preset": "0.74.81",
21
+ "@react-native/eslint-config": "0.74.81",
22
+ "@react-native/metro-config": "0.74.81",
23
+ "@react-native/typescript-config": "0.74.81",
24
24
  "@types/react": "^18.2.6",
25
25
  "@types/react-test-renderer": "^18.0.0",
26
26
  "babel-jest": "^29.6.3",