react-native 0.72.11 → 0.72.13
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/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- 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/uimanager/UIImplementation.java +1 -7
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +6 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +1 -1
- package/scripts/cocoapods/__tests__/new_architecture-test.rb +2 -2
- package/scripts/cocoapods/new_architecture.rb +5 -1
- package/scripts/cocoapods/utils.rb +60 -0
- package/scripts/react_native_pods.rb +2 -0
- package/sdks/hermes-engine/hermes-engine.podspec +1 -1
- package/sdks/hermes-engine/hermes-utils.rb +1 -1
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/template/package.json +1 -1
|
@@ -192,7 +192,7 @@ export function parseComponentStack(message: string): ComponentStack {
|
|
|
192
192
|
if (!s) {
|
|
193
193
|
return null;
|
|
194
194
|
}
|
|
195
|
-
const match = s.match(/(.*) \(at (.*\.js):([\d]+)\)/);
|
|
195
|
+
const match = s.match(/(.*) \(at (.*\.(?:js|jsx|ts|tsx)):([\d]+)\)/);
|
|
196
196
|
if (!match) {
|
|
197
197
|
return null;
|
|
198
198
|
}
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -175,7 +175,7 @@ public class UIImplementation {
|
|
|
175
175
|
*
|
|
176
176
|
* @return The num of root view
|
|
177
177
|
*/
|
|
178
|
-
|
|
178
|
+
public int getRootViewNum() {
|
|
179
179
|
return mOperationsQueue.getNativeViewHierarchyManager().getRootViewNum();
|
|
180
180
|
}
|
|
181
181
|
|
|
@@ -608,12 +608,6 @@ public class UIImplementation {
|
|
|
608
608
|
|
|
609
609
|
/** Invoked at the end of the transaction to commit any updates to the node hierarchy. */
|
|
610
610
|
public void dispatchViewUpdates(int batchId) {
|
|
611
|
-
if (getRootViewNum() <= 0) {
|
|
612
|
-
// If there are no RootViews registered, there will be no View updates to dispatch.
|
|
613
|
-
// This is a hack to prevent this from being called when Fabric is used everywhere.
|
|
614
|
-
// This should no longer be necessary in Bridgeless Mode.
|
|
615
|
-
return;
|
|
616
|
-
}
|
|
617
611
|
SystraceMessage.beginSection(
|
|
618
612
|
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "UIImplementation.dispatchViewUpdates")
|
|
619
613
|
.arg("batchId", batchId)
|
|
@@ -719,7 +719,12 @@ public class UIManagerModule extends ReactContextBaseJavaModule
|
|
|
719
719
|
listener.willDispatchViewUpdates(this);
|
|
720
720
|
}
|
|
721
721
|
try {
|
|
722
|
-
|
|
722
|
+
// If there are no RootViews registered, there will be no View updates to dispatch.
|
|
723
|
+
// This is a hack to prevent this from being called when Fabric is used everywhere.
|
|
724
|
+
// This should no longer be necessary in Bridgeless Mode.
|
|
725
|
+
if (mUIImplementation.getRootViewNum() > 0) {
|
|
726
|
+
mUIImplementation.dispatchViewUpdates(batchId);
|
|
727
|
+
}
|
|
723
728
|
} finally {
|
|
724
729
|
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
|
|
725
730
|
}
|
package/package.json
CHANGED
|
@@ -128,7 +128,7 @@ class NewArchitectureTests < Test::Unit::TestCase
|
|
|
128
128
|
NewArchitectureHelper.install_modules_dependencies(spec, true, '2021.07.22.00')
|
|
129
129
|
|
|
130
130
|
# Assert
|
|
131
|
-
assert_equal(spec.compiler_flags, NewArchitectureHelper.folly_compiler_flags)
|
|
131
|
+
assert_equal(spec.compiler_flags, "$(inherited) #{NewArchitectureHelper.folly_compiler_flags} -DRCT_NEW_ARCH_ENABLED=1")
|
|
132
132
|
assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-utils/React_utils.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\"")
|
|
133
133
|
assert_equal(spec.pod_target_xcconfig["CLANG_CXX_LANGUAGE_STANDARD"], "c++17")
|
|
134
134
|
assert_equal(spec.pod_target_xcconfig["OTHER_CPLUSPLUSFLAGS"], "$(inherited) -DRCT_NEW_ARCH_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1")
|
|
@@ -166,7 +166,7 @@ class NewArchitectureTests < Test::Unit::TestCase
|
|
|
166
166
|
NewArchitectureHelper.install_modules_dependencies(spec, false, '2021.07.22.00')
|
|
167
167
|
|
|
168
168
|
# Assert
|
|
169
|
-
assert_equal(spec.compiler_flags, "-Wno-nullability-completeness #{NewArchitectureHelper.folly_compiler_flags}")
|
|
169
|
+
assert_equal(spec.compiler_flags, "$(inherited) -Wno-nullability-completeness #{NewArchitectureHelper.folly_compiler_flags}")
|
|
170
170
|
assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "#{other_flags} \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-utils/React_utils.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\"")
|
|
171
171
|
assert_equal(spec.pod_target_xcconfig["CLANG_CXX_LANGUAGE_STANDARD"], "c++17")
|
|
172
172
|
assert_equal(
|
|
@@ -87,6 +87,10 @@ class NewArchitectureHelper
|
|
|
87
87
|
current_config = hash["pod_target_xcconfig"] != nil ? hash["pod_target_xcconfig"] : {}
|
|
88
88
|
current_headers = current_config["HEADER_SEARCH_PATHS"] != nil ? current_config["HEADER_SEARCH_PATHS"] : ""
|
|
89
89
|
|
|
90
|
+
flags_to_add = new_arch_enabled ?
|
|
91
|
+
"#{@@folly_compiler_flags} -DRCT_NEW_ARCH_ENABLED=1" :
|
|
92
|
+
"#{@@folly_compiler_flags}"
|
|
93
|
+
|
|
90
94
|
header_search_paths = ["\"$(PODS_ROOT)/boost\""]
|
|
91
95
|
if ENV['USE_FRAMEWORKS']
|
|
92
96
|
header_search_paths << "\"$(PODS_ROOT)/DoubleConversion\""
|
|
@@ -100,7 +104,7 @@ class NewArchitectureHelper
|
|
|
100
104
|
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\""
|
|
101
105
|
end
|
|
102
106
|
header_search_paths_string = header_search_paths.join(" ")
|
|
103
|
-
spec.compiler_flags = compiler_flags.empty? ?
|
|
107
|
+
spec.compiler_flags = compiler_flags.empty? ? "$(inherited) #{flags_to_add}" : "$(inherited) #{compiler_flags} #{flags_to_add}"
|
|
104
108
|
current_config["HEADER_SEARCH_PATHS"] = current_headers.empty? ?
|
|
105
109
|
header_search_paths_string :
|
|
106
110
|
"#{current_headers} #{header_search_paths_string}"
|
|
@@ -78,6 +78,28 @@ class ReactNativePodsUtils
|
|
|
78
78
|
end
|
|
79
79
|
end
|
|
80
80
|
|
|
81
|
+
def self.fix_flipper_for_xcode_15_3(installer)
|
|
82
|
+
|
|
83
|
+
installer.pods_project.targets.each do |target|
|
|
84
|
+
if target.name == 'Flipper'
|
|
85
|
+
file_path = 'Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h'
|
|
86
|
+
if !File.exist?(file_path)
|
|
87
|
+
return
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
contents = File.read(file_path)
|
|
91
|
+
if contents.include?('#include <functional>')
|
|
92
|
+
return
|
|
93
|
+
end
|
|
94
|
+
mod_content = contents.gsub("#pragma once", "#pragma once\n#include <functional>")
|
|
95
|
+
File.chmod(0755, file_path)
|
|
96
|
+
File.open(file_path, 'w') do |file|
|
|
97
|
+
file.puts(mod_content)
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
81
103
|
def self.set_node_modules_user_settings(installer, react_native_path)
|
|
82
104
|
Pod::UI.puts("Setting REACT_NATIVE build settings")
|
|
83
105
|
projects = self.extract_projects(installer)
|
|
@@ -483,6 +505,44 @@ class ReactNativePodsUtils
|
|
|
483
505
|
])
|
|
484
506
|
end
|
|
485
507
|
|
|
508
|
+
def self.get_privacy_manifest_paths_from(user_project)
|
|
509
|
+
privacy_manifests = user_project
|
|
510
|
+
.files
|
|
511
|
+
.select { |p|
|
|
512
|
+
p.path&.end_with?('PrivacyInfo.xcprivacy')
|
|
513
|
+
}
|
|
514
|
+
return privacy_manifests
|
|
515
|
+
end
|
|
516
|
+
|
|
517
|
+
def self.add_privacy_manifest_if_needed(installer)
|
|
518
|
+
user_project = installer.aggregate_targets
|
|
519
|
+
.map{ |t| t.user_project }
|
|
520
|
+
.first
|
|
521
|
+
privacy_manifest = self.get_privacy_manifest_paths_from(user_project).first
|
|
522
|
+
if privacy_manifest.nil?
|
|
523
|
+
file_timestamp_reason = {
|
|
524
|
+
"NSPrivacyAccessedAPIType" => "NSPrivacyAccessedAPICategoryFileTimestamp",
|
|
525
|
+
"NSPrivacyAccessedAPITypeReasons" => ["C617.1"],
|
|
526
|
+
}
|
|
527
|
+
user_defaults_reason = {
|
|
528
|
+
"NSPrivacyAccessedAPIType" => "NSPrivacyAccessedAPICategoryUserDefaults",
|
|
529
|
+
"NSPrivacyAccessedAPITypeReasons" => ["CA92.1"],
|
|
530
|
+
}
|
|
531
|
+
boot_time_reason = {
|
|
532
|
+
"NSPrivacyAccessedAPIType" => "NSPrivacyAccessedAPICategorySystemBootTime",
|
|
533
|
+
"NSPrivacyAccessedAPITypeReasons" => ["35F9.1"],
|
|
534
|
+
}
|
|
535
|
+
privacy_manifest = {
|
|
536
|
+
"NSPrivacyCollectedDataTypes" => [],
|
|
537
|
+
"NSPrivacyTracking" => false,
|
|
538
|
+
"NSPrivacyAccessedAPITypes" => [file_timestamp_reason, user_defaults_reason, boot_time_reason]
|
|
539
|
+
}
|
|
540
|
+
path = File.join(user_project.path.parent, "PrivacyInfo.xcprivacy")
|
|
541
|
+
Xcodeproj::Plist.write_to_path(privacy_manifest, path)
|
|
542
|
+
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
|
|
543
|
+
end
|
|
544
|
+
end
|
|
545
|
+
|
|
486
546
|
def self.react_native_pods
|
|
487
547
|
return [
|
|
488
548
|
"DoubleConversion",
|
|
@@ -248,6 +248,8 @@ def react_native_post_install(
|
|
|
248
248
|
ReactNativePodsUtils.apply_flags_for_fabric(installer, fabric_enabled: fabric_enabled)
|
|
249
249
|
ReactNativePodsUtils.apply_xcode_15_patch(installer)
|
|
250
250
|
ReactNativePodsUtils.updateIphoneOSDeploymentTarget(installer)
|
|
251
|
+
ReactNativePodsUtils.fix_flipper_for_xcode_15_3(installer)
|
|
252
|
+
ReactNativePodsUtils.add_privacy_manifest_if_needed(installer)
|
|
251
253
|
|
|
252
254
|
NewArchitectureHelper.set_clang_cxx_language_standard_if_needed(installer)
|
|
253
255
|
is_new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == "1"
|
|
@@ -17,7 +17,7 @@ version = package['version']
|
|
|
17
17
|
|
|
18
18
|
# sdks/.hermesversion
|
|
19
19
|
hermestag_file = File.join(react_native_path, "sdks", ".hermesversion")
|
|
20
|
-
build_from_source = ENV['
|
|
20
|
+
build_from_source = ENV['RCT_BUILD_HERMES_FROM_SOURCE'] === 'true'
|
|
21
21
|
|
|
22
22
|
git = "https://github.com/facebook/hermes.git"
|
|
23
23
|
|
|
@@ -17,7 +17,7 @@ end
|
|
|
17
17
|
# - To use a specific tarball, install the dependencies with:
|
|
18
18
|
# `HERMES_ENGINE_TARBALL_PATH=<path_to_tarball> bundle exec pod install`
|
|
19
19
|
# - To force a build from source, install the dependencies with:
|
|
20
|
-
# `
|
|
20
|
+
# `RCT_BUILD_HERMES_FROM_SOURCE=true bundle exec pod install`
|
|
21
21
|
# If none of the two are provided, Cocoapods will check whether there is a tarball for the current version
|
|
22
22
|
# (either release or nightly). If not, it will fall back building from source (the latest commit on main).
|
|
23
23
|
#
|
|
Binary file
|
|
Binary file
|