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.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/RCTDevMenu.mm +1 -1
- package/React/CoreModules/RCTDevSettings.mm +9 -4
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessCatalystInstance.kt +4 -4
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +8 -8
- package/scripts/cocoapods/utils.rb +56 -3
- package/scripts/react_native_pods.rb +1 -0
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/template/package.json +5 -5
package/React/Base/RCTVersion.m
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
289
|
+
if ([self _isBridgeMode]) {
|
|
285
290
|
return self.bridge.isInspectable;
|
|
286
291
|
} else {
|
|
287
292
|
return self.isInspectable;
|
|
@@ -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
|
-
|
|
148
|
+
override fun getJavaScriptContextHolder(): JavaScriptContextHolder? {
|
|
149
|
+
return reactHost.getJavaScriptContextHolder()
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
override fun getRuntimeExecutor(): RuntimeExecutor {
|
|
153
|
-
|
|
152
|
+
override fun getRuntimeExecutor(): RuntimeExecutor? {
|
|
153
|
+
return reactHost.getRuntimeExecutor()
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
override fun getRuntimeScheduler(): RuntimeScheduler {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.74.0
|
|
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.
|
|
114
|
-
"@react-native/codegen": "0.74.
|
|
115
|
-
"@react-native/community-cli-plugin": "0.74.
|
|
116
|
-
"@react-native/gradle-plugin": "0.74.
|
|
117
|
-
"@react-native/js-polyfills": "0.74.
|
|
118
|
-
"@react-native/normalize-colors": "0.74.
|
|
119
|
-
"@react-native/virtualized-lists": "0.74.
|
|
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
|
package/template/package.json
CHANGED
|
@@ -11,16 +11,16 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"react": "18.2.0",
|
|
14
|
-
"react-native": "0.74.0
|
|
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.
|
|
21
|
-
"@react-native/eslint-config": "0.74.
|
|
22
|
-
"@react-native/metro-config": "0.74.
|
|
23
|
-
"@react-native/typescript-config": "0.74.
|
|
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",
|