react-native 0.74.2 → 0.74.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.
- package/Libraries/AppDelegate/RCTAppDelegate.mm +4 -1
- package/Libraries/AppDelegate/RCTRootViewFactory.h +8 -0
- package/Libraries/AppDelegate/RCTRootViewFactory.mm +11 -3
- package/Libraries/AppDelegate/React-RCTAppDelegate.podspec +2 -2
- package/Libraries/Blob/React-RCTBlob.podspec +1 -1
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/RCTImageLoader.mm +2 -6
- package/Libraries/Image/React-RCTImage.podspec +1 -1
- package/Libraries/LinkingIOS/React-RCTLinking.podspec +1 -1
- package/Libraries/NativeAnimation/React-RCTAnimation.podspec +1 -1
- package/Libraries/Network/RCTNetworkTask.mm +4 -3
- package/Libraries/Network/React-RCTNetwork.podspec +1 -1
- package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +1 -1
- package/Libraries/Settings/React-RCTSettings.podspec +1 -1
- package/Libraries/Text/React-RCTText.podspec +1 -1
- package/Libraries/Text/TextInput/Multiline/RCTUITextView.mm +6 -0
- package/Libraries/Text/TextInput/RCTBackedTextInputViewProtocol.h +1 -0
- package/Libraries/Text/TextInput/Singleline/RCTUITextField.mm +5 -0
- package/Libraries/TypeSafety/RCTTypeSafety.podspec +1 -1
- package/Libraries/Vibration/React-RCTVibration.podspec +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/React-CoreModules.podspec +1 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +6 -1
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +4 -0
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +3 -2
- package/React/React-RCTFabric.podspec +1 -1
- package/React/Views/RCTComponentData.m +11 -3
- package/React-Core.podspec +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +2 -4
- package/ReactAndroid/src/main/java/com/facebook/react/modules/core/JavaTimerManager.java +5 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactSurfaceView.java +5 -0
- package/ReactApple/Libraries/RCTFoundation/RCTDeprecation/RCTDeprecation.podspec +1 -1
- package/ReactCommon/React-Fabric.podspec +1 -1
- package/ReactCommon/React-FabricImage.podspec +1 -1
- package/ReactCommon/React-Mapbuffer.podspec +1 -1
- package/ReactCommon/React-nativeconfig.podspec +1 -1
- package/ReactCommon/React-rncore.podspec +1 -1
- package/ReactCommon/ReactCommon.podspec +1 -1
- package/ReactCommon/cxxreact/React-cxxreact.podspec +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/hermes/React-hermes.podspec +1 -1
- package/ReactCommon/hermes/executor/React-jsitracing.podspec +1 -1
- package/ReactCommon/jsc/JSCRuntime.cpp +30 -2
- package/ReactCommon/jserrorhandler/React-jserrorhandler.podspec +1 -1
- package/ReactCommon/jsi/jsi/decorator.h +7 -0
- package/ReactCommon/jsi/jsi/jsi.h +7 -0
- package/ReactCommon/jsiexecutor/React-jsiexecutor.podspec +1 -1
- package/ReactCommon/jsinspector-modern/React-jsinspector.podspec +1 -1
- package/ReactCommon/react/debug/React-debug.podspec +1 -1
- package/ReactCommon/react/featureflags/React-featureflags.podspec +1 -1
- package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp +53 -10
- package/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +1 -1
- package/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec +1 -1
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm +4 -3
- package/ReactCommon/react/renderer/debug/React-rendererdebug.podspec +1 -1
- package/ReactCommon/react/renderer/graphics/React-graphics.podspec +1 -1
- package/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec +1 -1
- package/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +1 -1
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +0 -1
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Legacy.cpp +3 -3
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.cpp +28 -28
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.h +3 -3
- package/ReactCommon/react/renderer/runtimescheduler/Task.cpp +9 -7
- package/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp +46 -0
- package/ReactCommon/react/runtime/React-RuntimeCore.podspec +1 -1
- package/ReactCommon/react/runtime/React-RuntimeHermes.podspec +1 -1
- package/ReactCommon/react/runtime/platform/ios/React-RuntimeApple.podspec +1 -1
- package/ReactCommon/react/utils/React-utils.podspec +1 -1
- package/ReactCommon/reactperflogger/React-perflogger.podspec +1 -1
- package/package.json +11 -11
- package/scripts/cocoapods/helpers.rb +4 -0
- package/scripts/cocoapods/new_architecture.rb +10 -23
- package/scripts/cocoapods/privacy_manifest_utils.rb +11 -5
- package/scripts/cocoapods/utils.rb +12 -1
- package/scripts/codegen/generate-artifacts-executor.js +1 -1
- package/scripts/react_native_pods.rb +4 -0
- package/scripts/react_native_pods_utils/script_phases.sh +1 -1
- package/sdks/.hermesversion +1 -1
- package/sdks/hermes-engine/hermes-engine.podspec +2 -1
- package/sdks/hermes-engine/utils/build-apple-framework.sh +11 -5
- package/sdks/hermes-engine/utils/build-hermes-xcode.sh +11 -5
- package/sdks/hermes-engine/utils/build-ios-framework.sh +17 -5
- package/sdks/hermes-engine/utils/create-dummy-hermes-xcframework.sh +1 -1
- 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/third-party-podspecs/RCT-Folly.podspec +1 -1
- package/third-party-podspecs/fmt.podspec +1 -1
- package/ReactCommon/react/renderer/runtimescheduler/ErrorUtils.h +0 -34
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.74.
|
|
3
|
+
"version": "0.74.4",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -107,16 +107,16 @@
|
|
|
107
107
|
},
|
|
108
108
|
"dependencies": {
|
|
109
109
|
"@jest/create-cache-key-function": "^29.6.3",
|
|
110
|
-
"@react-native-community/cli": "13.6.
|
|
111
|
-
"@react-native-community/cli-platform-android": "13.6.
|
|
112
|
-
"@react-native-community/cli-platform-ios": "13.6.
|
|
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.
|
|
110
|
+
"@react-native-community/cli": "13.6.9",
|
|
111
|
+
"@react-native-community/cli-platform-android": "13.6.9",
|
|
112
|
+
"@react-native-community/cli-platform-ios": "13.6.9",
|
|
113
|
+
"@react-native/assets-registry": "0.74.86",
|
|
114
|
+
"@react-native/codegen": "0.74.86",
|
|
115
|
+
"@react-native/community-cli-plugin": "0.74.86",
|
|
116
|
+
"@react-native/gradle-plugin": "0.74.86",
|
|
117
|
+
"@react-native/js-polyfills": "0.74.86",
|
|
118
|
+
"@react-native/normalize-colors": "0.74.86",
|
|
119
|
+
"@react-native/virtualized-lists": "0.74.86",
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
27
|
-
|
|
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
|
-
|
|
32
|
-
|
|
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"] =
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
@@ -364,7 +364,7 @@ function computeOutputPath(projectRoot, baseOutputPath, pkgJson, platform) {
|
|
|
364
364
|
if (baseOutputPath == null) {
|
|
365
365
|
const outputDirFromPkgJson = readOutputDirFromPkgJson(pkgJson, platform);
|
|
366
366
|
if (outputDirFromPkgJson != null) {
|
|
367
|
-
baseOutputPath = outputDirFromPkgJson;
|
|
367
|
+
baseOutputPath = path.join(projectRoot, outputDirFromPkgJson);
|
|
368
368
|
} else {
|
|
369
369
|
baseOutputPath = projectRoot;
|
|
370
370
|
}
|
|
@@ -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
|
}
|
package/sdks/.hermesversion
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
hermes-2024-06-
|
|
1
|
+
hermes-2024-06-28-RNv0.74.3-7bda0c267e76d11b68a585f84cfdd65000babf85
|
|
@@ -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
|
|
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,25 @@ 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
|
+
return
|
|
31
|
+
else
|
|
32
|
+
echo "$(get_ios_deployment_target)"
|
|
33
|
+
return
|
|
34
|
+
fi
|
|
35
|
+
}
|
|
36
|
+
|
|
27
37
|
# build a single framework
|
|
28
38
|
# $1 is the target to build
|
|
29
39
|
function build_framework {
|
|
30
40
|
if [ ! -d destroot/Library/Frameworks/universal/hermes.xcframework ]; then
|
|
31
|
-
|
|
41
|
+
deployment_target=$(get_deployment_target "$1")
|
|
32
42
|
|
|
33
43
|
architecture=$(get_architecture "$1")
|
|
34
44
|
|
|
35
|
-
build_apple_framework "$1" "$architecture" "$
|
|
45
|
+
build_apple_framework "$1" "$architecture" "$deployment_target"
|
|
36
46
|
else
|
|
37
47
|
echo "Skipping; Clean \"destroot\" to rebuild".
|
|
38
48
|
fi
|
|
@@ -41,7 +51,7 @@ function build_framework {
|
|
|
41
51
|
# group the frameworks together to create a universal framework
|
|
42
52
|
function build_universal_framework {
|
|
43
53
|
if [ ! -d destroot/Library/Frameworks/universal/hermes.xcframework ]; then
|
|
44
|
-
create_universal_framework "iphoneos" "iphonesimulator" "catalyst"
|
|
54
|
+
create_universal_framework "iphoneos" "iphonesimulator" "catalyst" "xros" "xrsimulator"
|
|
45
55
|
else
|
|
46
56
|
echo "Skipping; Clean \"destroot\" to rebuild".
|
|
47
57
|
fi
|
|
@@ -56,6 +66,8 @@ function create_framework {
|
|
|
56
66
|
build_framework "iphoneos"
|
|
57
67
|
build_framework "iphonesimulator"
|
|
58
68
|
build_framework "catalyst"
|
|
69
|
+
build_framework "xros"
|
|
70
|
+
build_framework "xrsimulator"
|
|
59
71
|
|
|
60
72
|
build_universal_framework
|
|
61
73
|
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
|
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.
|
|
14
|
+
"react-native": "0.74.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.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.86",
|
|
21
|
+
"@react-native/eslint-config": "0.74.86",
|
|
22
|
+
"@react-native/metro-config": "0.74.86",
|
|
23
|
+
"@react-native/typescript-config": "0.74.86",
|
|
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" =>
|
|
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" =>
|
|
18
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
|
19
19
|
}
|
|
20
20
|
spec.platforms = min_supported_versions
|
|
21
21
|
spec.libraries = "c++"
|
|
@@ -1,34 +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
|
-
#include <jsi/jsi.h>
|
|
9
|
-
|
|
10
|
-
namespace facebook::react {
|
|
11
|
-
|
|
12
|
-
inline static void handleFatalError(
|
|
13
|
-
jsi::Runtime& runtime,
|
|
14
|
-
const jsi::JSError& error) {
|
|
15
|
-
auto reportFatalError = "reportFatalError";
|
|
16
|
-
auto errorUtils = runtime.global().getProperty(runtime, "ErrorUtils");
|
|
17
|
-
if (errorUtils.isUndefined() || !errorUtils.isObject() ||
|
|
18
|
-
!errorUtils.getObject(runtime).hasProperty(runtime, reportFatalError)) {
|
|
19
|
-
// ErrorUtils was not set up. This probably means the bundle didn't
|
|
20
|
-
// load properly.
|
|
21
|
-
throw jsi::JSError(
|
|
22
|
-
runtime,
|
|
23
|
-
"ErrorUtils is not set up properly. Something probably went wrong trying to load the JS bundle. Trying to report error " +
|
|
24
|
-
error.getMessage(),
|
|
25
|
-
error.getStack());
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
auto func = errorUtils.asObject(runtime).getPropertyAsFunction(
|
|
29
|
-
runtime, reportFatalError);
|
|
30
|
-
|
|
31
|
-
func.call(runtime, error.value());
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
} // namespace facebook::react
|