react-native-tvos 0.74.2-0 → 0.74.5-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/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/Components/Pressable/Pressable.js +2 -2
- 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/RCTBaseTextInputView.mm +0 -13
- 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/README.md +2 -0
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/React-CoreModules.podspec +1 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +10 -5
- 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/Views/ScrollView/RCTScrollView.m +4 -4
- package/React-Core.podspec +1 -1
- package/ReactAndroid/api/ReactAndroid.api +0 -9
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/publish.gradle +56 -39
- package/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +2 -4
- package/ReactAndroid/src/main/java/com/facebook/react/common/build/ReactBuildConfig.java +23 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/core/JavaTimerManager.java +5 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/core/ReactAndroidHWInputDeviceHelper.java +20 -0
- 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/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java +9 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputKeyPressEvent.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +0 -5
- 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 +13 -13
- 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 -14
- package/sdks/hermes-engine/utils/build-hermes-xcode.sh +11 -5
- package/sdks/hermes-engine/utils/build-ios-framework.sh +17 -8
- 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 +6 -6
- package/third-party-podspecs/RCT-Folly.podspec +1 -1
- package/third-party-podspecs/fmt.podspec +1 -1
- package/types/public/ReactNativeTVTypes.d.ts +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputEvent.java +0 -70
- package/ReactCommon/react/renderer/runtimescheduler/ErrorUtils.h +0 -34
|
@@ -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
|
|
@@ -365,7 +365,7 @@ function computeOutputPath(projectRoot, baseOutputPath, pkgJson, platform) {
|
|
|
365
365
|
if (baseOutputPath == null) {
|
|
366
366
|
const outputDirFromPkgJson = readOutputDirFromPkgJson(pkgJson, platform);
|
|
367
367
|
if (outputDirFromPkgJson != null) {
|
|
368
|
-
baseOutputPath = outputDirFromPkgJson;
|
|
368
|
+
baseOutputPath = path.join(projectRoot, outputDirFromPkgJson);
|
|
369
369
|
} else {
|
|
370
370
|
baseOutputPath = projectRoot;
|
|
371
371
|
}
|
|
@@ -267,6 +267,10 @@ def get_folly_config()
|
|
|
267
267
|
return Helpers::Constants.folly_config
|
|
268
268
|
end
|
|
269
269
|
|
|
270
|
+
def rct_cxx_language_standard()
|
|
271
|
+
return Helpers::Constants.cxx_language_standard
|
|
272
|
+
end
|
|
273
|
+
|
|
270
274
|
# Function that executes after React Native has been installed to configure some flags and build settings.
|
|
271
275
|
#
|
|
272
276
|
# 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-8a42e289991d48575dcb4012ea9205d707dac43d
|
|
@@ -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", :tvos => "13.4" }
|
|
27
|
+
spec.platforms = { :osx => "10.13", :ios => "13.4", :tvos => "13.4", :visionos => "1.0" }
|
|
28
28
|
|
|
29
29
|
spec.preserve_paths = '**/*.*'
|
|
30
30
|
spec.source_files = ''
|
|
@@ -46,6 +46,7 @@ Pod::Spec.new do |spec|
|
|
|
46
46
|
ss.header_mappings_dir = "destroot/include"
|
|
47
47
|
ss.ios.vendored_frameworks = "destroot/Library/Frameworks/universal/hermes.xcframework"
|
|
48
48
|
ss.tvos.vendored_frameworks = "destroot/Library/Frameworks/universal/hermes.xcframework"
|
|
49
|
+
ss.visionos.vendored_frameworks = "destroot/Library/Frameworks/universal/hermes.xcframework"
|
|
49
50
|
ss.osx.vendored_frameworks = "destroot/Library/Frameworks/macosx/hermes.framework"
|
|
50
51
|
end
|
|
51
52
|
|
|
@@ -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" "appletvos" "appletvsimulator")
|
|
21
|
+
|
|
20
22
|
if [[ -z "$JSI_PATH" ]]; then
|
|
21
23
|
JSI_PATH="$REACT_NATIVE_PATH/ReactCommon/jsi"
|
|
22
24
|
fi
|
|
@@ -41,6 +43,10 @@ function get_tvos_deployment_target {
|
|
|
41
43
|
use_env_var_or_ruby_prop "${IOS_DEPLOYMENT_TARGET}" "deployment_target('tvos')"
|
|
42
44
|
}
|
|
43
45
|
|
|
46
|
+
function get_visionos_deployment_target {
|
|
47
|
+
use_env_var_or_ruby_prop "${XROS_DEPLOYMENT_TARGET}" "deployment_target('visionos')"
|
|
48
|
+
}
|
|
49
|
+
|
|
44
50
|
function get_mac_deployment_target {
|
|
45
51
|
use_env_var_or_ruby_prop "${MAC_DEPLOYMENT_TARGET}" "deployment_target('osx')"
|
|
46
52
|
}
|
|
@@ -164,21 +170,12 @@ function build_apple_framework {
|
|
|
164
170
|
}
|
|
165
171
|
|
|
166
172
|
function prepare_dest_root_for_ci {
|
|
173
|
+
mkdir -p "destroot/bin"
|
|
174
|
+
for platform in "${PLATFORMS[@]}"; do
|
|
175
|
+
mkdir -p "destroot/Library/Frameworks/$platform"
|
|
176
|
+
cp -R "./build_$platform/API/hermes/hermes.framework"* "destroot/Library/Frameworks/$platform"
|
|
177
|
+
done
|
|
167
178
|
|
|
168
|
-
mkdir -p "destroot/Library/Frameworks/macosx"
|
|
169
|
-
mkdir -p "destroot/bin"
|
|
170
|
-
mkdir -p "destroot/Library/Frameworks/iphoneos"
|
|
171
|
-
mkdir -p "destroot/Library/Frameworks/iphonesimulator"
|
|
172
|
-
mkdir -p "destroot/Library/Frameworks/appletvos"
|
|
173
|
-
mkdir -p "destroot/Library/Frameworks/appletvsimulator"
|
|
174
|
-
mkdir -p "destroot/Library/Frameworks/catalyst"
|
|
175
|
-
|
|
176
|
-
cp -R "./build_macosx/API/hermes/hermes.framework"* "destroot/Library/Frameworks/macosx"
|
|
177
|
-
cp -R "./build_iphoneos/API/hermes/hermes.framework"* "destroot/Library/Frameworks/iphoneos"
|
|
178
|
-
cp -R "./build_iphonesimulator/API/hermes/hermes.framework"* "destroot/Library/Frameworks/iphonesimulator"
|
|
179
|
-
cp -R "./build_appletvos/API/hermes/hermes.framework"* "destroot/Library/Frameworks/appletvos"
|
|
180
|
-
cp -R "./build_appletvsimulator/API/hermes/hermes.framework"* "destroot/Library/Frameworks/appletvsimulator"
|
|
181
|
-
cp -R "./build_catalyst/API/hermes/hermes.framework"* "destroot/Library/Frameworks/catalyst"
|
|
182
179
|
cp "./build_macosx/bin/"* "destroot/bin"
|
|
183
180
|
|
|
184
181
|
# 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"
|
|
@@ -28,18 +28,25 @@ function get_architecture {
|
|
|
28
28
|
fi
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
function get_deployment_target {
|
|
32
|
+
if [[ $1 == "xros" || $1 == "xrsimulator" ]]; then
|
|
33
|
+
echo "$(get_visionos_deployment_target)"
|
|
34
|
+
elif [[ $1 == "appletvos" || $1 == "appletvsimulator" ]]; then
|
|
35
|
+
echo "$(get_tvos_deployment_target)"
|
|
36
|
+
else
|
|
37
|
+
echo "$(get_ios_deployment_target)"
|
|
38
|
+
fi
|
|
39
|
+
}
|
|
40
|
+
|
|
31
41
|
# build a single framework
|
|
32
42
|
# $1 is the target to build
|
|
33
43
|
function build_framework {
|
|
34
44
|
if [ ! -d destroot/Library/Frameworks/universal/hermes.xcframework ]; then
|
|
35
|
-
|
|
36
|
-
if [[ "$1" == "appletvos" || "$1" == "appletvsimulator" ]]; then
|
|
37
|
-
ios_deployment_target=$(get_tvos_deployment_target)
|
|
38
|
-
fi
|
|
45
|
+
deployment_target=$(get_deployment_target "$1")
|
|
39
46
|
|
|
40
47
|
architecture=$(get_architecture "$1")
|
|
41
48
|
|
|
42
|
-
build_apple_framework "$1" "$architecture" "$
|
|
49
|
+
build_apple_framework "$1" "$architecture" "$deployment_target"
|
|
43
50
|
else
|
|
44
51
|
echo "Skipping; Clean \"destroot\" to rebuild".
|
|
45
52
|
fi
|
|
@@ -48,7 +55,7 @@ function build_framework {
|
|
|
48
55
|
# group the frameworks together to create a universal framework
|
|
49
56
|
function build_universal_framework {
|
|
50
57
|
if [ ! -d destroot/Library/Frameworks/universal/hermes.xcframework ]; then
|
|
51
|
-
create_universal_framework "iphoneos" "iphonesimulator" "appletvos" "appletvsimulator" "catalyst"
|
|
58
|
+
create_universal_framework "iphoneos" "iphonesimulator" "appletvos" "appletvsimulator" "catalyst" "xros" "xrsimulator"
|
|
52
59
|
else
|
|
53
60
|
echo "Skipping; Clean \"destroot\" to rebuild".
|
|
54
61
|
fi
|
|
@@ -65,6 +72,8 @@ function create_framework {
|
|
|
65
72
|
build_framework "appletvos"
|
|
66
73
|
build_framework "appletvsimulator"
|
|
67
74
|
build_framework "catalyst"
|
|
75
|
+
build_framework "xros"
|
|
76
|
+
build_framework "xrsimulator"
|
|
68
77
|
|
|
69
78
|
build_universal_framework
|
|
70
79
|
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,18 +11,18 @@
|
|
|
11
11
|
"test": "jest"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"expo": "^
|
|
14
|
+
"expo": "^51.0.17",
|
|
15
15
|
"react": "18.2.0",
|
|
16
|
-
"react-native": "npm:react-native-tvos@0.74.
|
|
16
|
+
"react-native": "npm:react-native-tvos@0.74.5-0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@babel/core": "^7.20.0",
|
|
20
20
|
"@babel/preset-env": "^7.20.0",
|
|
21
21
|
"@babel/runtime": "^7.20.0",
|
|
22
|
-
"@react-native/babel-preset": "0.74.
|
|
23
|
-
"@react-native/eslint-config": "0.74.
|
|
24
|
-
"@react-native/metro-config": "0.74.
|
|
25
|
-
"@react-native/typescript-config": "0.74.
|
|
22
|
+
"@react-native/babel-preset": "0.74.87",
|
|
23
|
+
"@react-native/eslint-config": "0.74.87",
|
|
24
|
+
"@react-native/metro-config": "0.74.87",
|
|
25
|
+
"@react-native/typescript-config": "0.74.87",
|
|
26
26
|
"@types/react": "^18.2.6",
|
|
27
27
|
"@types/react-test-renderer": "^18.0.0",
|
|
28
28
|
"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++"
|
|
@@ -3,6 +3,10 @@ import type { View, ScrollViewProps, HostComponent, TVParallaxProperties, EventS
|
|
|
3
3
|
|
|
4
4
|
declare module 'react-native' {
|
|
5
5
|
interface ViewProps {
|
|
6
|
+
/**
|
|
7
|
+
* Android TV only prop
|
|
8
|
+
*/
|
|
9
|
+
tvFocusable?: boolean | undefined,
|
|
6
10
|
/**
|
|
7
11
|
* TV next focus down (see documentation for the View component).
|
|
8
12
|
*/
|
package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputEvent.java
DELETED
|
@@ -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
|
-
}
|
|
@@ -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
|