react-native-tvos 0.74.0-0rc0 → 0.74.0-0rc2

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.
Files changed (85) hide show
  1. package/Libraries/AppDelegate/RCTAppDelegate.mm +10 -5
  2. package/Libraries/AppDelegate/RCTRootViewFactory.h +13 -3
  3. package/Libraries/AppDelegate/RCTRootViewFactory.mm +25 -10
  4. package/Libraries/Components/Pressable/Pressable.js +9 -13
  5. package/Libraries/Components/Touchable/TVTouchable.js +1 -1
  6. package/Libraries/Components/Touchable/TouchableHighlight.js +2 -2
  7. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +2 -2
  8. package/Libraries/Components/Touchable/TouchableOpacity.js +2 -2
  9. package/Libraries/Core/ReactNativeVersion.js +1 -1
  10. package/Libraries/Pressability/Pressability.js +5 -0
  11. package/Libraries/ReactNative/AppContainer-dev.js +21 -2
  12. package/React/Base/RCTBridge+Inspector.h +30 -0
  13. package/React/Base/RCTBridge+Private.h +0 -20
  14. package/React/Base/RCTBridge.mm +1 -0
  15. package/React/Base/RCTBridgeProxy.h +6 -1
  16. package/React/Base/RCTBridgeProxy.mm +4 -2
  17. package/React/Base/RCTTVNavigationEventNotification.h +37 -0
  18. package/React/Base/RCTTVNavigationEventNotification.mm +106 -0
  19. package/React/Base/RCTTVNavigationEventNotificationConstants.h +25 -0
  20. package/React/Base/RCTTVNavigationEventNotificationConstants.mm +18 -0
  21. package/React/Base/RCTTVRemoteHandler.h +0 -26
  22. package/React/Base/RCTTVRemoteHandler.m +34 -90
  23. package/React/Base/RCTTVRemoteHandlerConstants.h +37 -0
  24. package/React/Base/RCTTVRemoteHandlerConstants.mm +32 -0
  25. package/React/Base/RCTVersion.m +1 -1
  26. package/React/CoreModules/RCTDevSettings.mm +1 -0
  27. package/React/CoreModules/RCTDeviceInfo.mm +15 -16
  28. package/React/CoreModules/RCTTVNavigationEventEmitter.mm +2 -1
  29. package/React/CxxBridge/RCTCxxBridge.mm +1 -0
  30. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +11 -12
  31. package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +6 -17
  32. package/React/Fabric/RCTSurfacePointerHandler.mm +1 -0
  33. package/React/Modules/RCTUIManager.m +10 -0
  34. package/React/Views/RCTTVView.m +6 -17
  35. package/React/Views/ScrollView/RCTScrollView.m +11 -12
  36. package/ReactAndroid/api/ReactAndroid.api +25 -1
  37. package/ReactAndroid/build.gradle.kts +18 -6
  38. package/ReactAndroid/gradle.properties +1 -1
  39. package/ReactAndroid/hermes-engine/build.gradle.kts +2 -0
  40. package/ReactAndroid/src/main/java/com/facebook/react/DebugCorePackage.java +1 -1
  41. package/ReactAndroid/src/main/java/com/facebook/react/ReactActivity.java +4 -0
  42. package/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java +14 -36
  43. package/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.java +106 -9
  44. package/ReactAndroid/src/main/java/com/facebook/react/ReactHost.kt +8 -0
  45. package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +2 -1
  46. package/ReactAndroid/src/main/java/com/facebook/react/fabric/internal/interop/InteropUiBlockListener.kt +8 -2
  47. package/ReactAndroid/src/main/java/com/facebook/react/modules/core/ReactAndroidHWInputDeviceHelper.java +12 -7
  48. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  49. package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java +64 -0
  50. package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactInstance.java +4 -0
  51. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java +1 -7
  52. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +6 -1
  53. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerRegistry.java +17 -1
  54. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java +1 -1
  55. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  56. package/ReactCommon/jserrorhandler/React-jserrorhandler.podspec +1 -1
  57. package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm +4 -1
  58. package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm +1 -1
  59. package/ReactCommon/react/runtime/React-RuntimeCore.podspec +1 -1
  60. package/ReactCommon/react/runtime/hermes/HermesInstance.cpp +0 -1
  61. package/ReactCommon/react/runtime/iostests/RCTHostTests.mm +2 -1
  62. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost+Internal.h +0 -2
  63. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.h +10 -1
  64. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm +32 -9
  65. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.h +2 -1
  66. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +6 -12
  67. package/ReactCommon/react/test_utils/ios/Shims/ShimRCTInstance.h +1 -1
  68. package/ReactCommon/react/test_utils/ios/Shims/ShimRCTInstance.mm +3 -2
  69. package/ReactCommon/yoga/Yoga.podspec +4 -1
  70. package/package.json +22 -14
  71. package/scripts/cocoapods/helpers.rb +4 -0
  72. package/scripts/cocoapods/utils.rb +27 -7
  73. package/scripts/react_native_pods.rb +2 -0
  74. package/scripts/xcode/ccache-clang++.sh +14 -0
  75. package/scripts/xcode/ccache-clang.sh +14 -0
  76. package/scripts/xcode/ccache.conf +11 -0
  77. package/sdks/hermes-engine/utils/build-ios-framework.sh +5 -0
  78. package/sdks/hermes-engine/utils/build-mac-framework.sh +5 -0
  79. package/sdks/hermesc/osx-bin/hermes +0 -0
  80. package/sdks/hermesc/osx-bin/hermesc +0 -0
  81. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  82. package/template/ios/HelloWorld/PrivacyInfo.xcprivacy +38 -0
  83. package/template/package.json +6 -6
  84. package/third-party-podspecs/RCT-Folly.podspec +2 -2
  85. package/ReactAndroid/src/main/java/com/facebook/react/common/build/ReactBuildConfig.java +0 -23
@@ -189,7 +189,7 @@ class ReactNativePodsUtils
189
189
  installer.target_installation_results.pod_target_installation_results.each do |pod_name, target_installation_result|
190
190
  if pod_name.to_s == target_pod_name
191
191
  target_installation_result.native_target.build_configurations.each do |config|
192
- if configuration == nil || (configuration != nil && configuration == config.name)
192
+ if configuration == nil || (configuration != nil && config.name.include?(configuration))
193
193
  config.build_settings[settings_name] ||= '$(inherited) '
194
194
  config.build_settings[settings_name] << settings_value
195
195
  end
@@ -411,19 +411,39 @@ class ReactNativePodsUtils
411
411
  def self.is_using_xcode15_0(xcodebuild_manager: Xcodebuild)
412
412
  xcodebuild_version = xcodebuild_manager.version
413
413
 
414
+ if version = self.parse_xcode_version(xcodebuild_version)
415
+ return version["major"] == 15 && version["minor"] == 0
416
+ end
417
+
418
+ return false
419
+ end
420
+
421
+ def self.parse_xcode_version(version_string)
414
422
  # The output of xcodebuild -version is something like
415
423
  # Xcode 15.0
416
424
  # or
417
425
  # Xcode 14.3.1
418
426
  # We want to capture the version digits
419
- regex = /(\d+)\.(\d+)(?:\.(\d+))?/
420
- if match_data = xcodebuild_version.match(regex)
421
- major = match_data[1].to_i
422
- minor = match_data[2].to_i
423
- return major == 15 && minor == 0
427
+ match = version_string.match(/(\d+)\.(\d+)(?:\.(\d+))?/)
428
+ return nil if match.nil?
429
+
430
+ return {"str" => match[0], "major" => match[1].to_i, "minor" => match[2].to_i};
431
+ end
432
+
433
+ def self.check_minimum_required_xcode(xcodebuild_manager: Xcodebuild)
434
+ version = self.parse_xcode_version(xcodebuild_manager.version)
435
+ if (version.nil? || !Gem::Version::correct?(version["str"]))
436
+ Pod::UI.warn "Unexpected XCode version string '#{xcodebuild_manager.version}'"
437
+ return
424
438
  end
425
439
 
426
- return false
440
+ current = version["str"]
441
+ min_required = Helpers::Constants.min_xcode_version_supported
442
+
443
+ if Gem::Version::new(current) < Gem::Version::new(min_required)
444
+ Pod::UI.puts "React Native requires XCode >= #{min_required}. Found #{current}.".red
445
+ raise "Please upgrade XCode"
446
+ end
427
447
  end
428
448
 
429
449
  def self.add_compiler_flag_to_project(installer, flag, configuration: nil)
@@ -81,6 +81,8 @@ def use_react_native! (
81
81
  ENV['APP_PATH'] = app_path
82
82
  ENV['REACT_NATIVE_PATH'] = path
83
83
 
84
+ ReactNativePodsUtils.check_minimum_required_xcode()
85
+
84
86
  # Current target definition is provided by Cocoapods and it refers to the target
85
87
  # that has invoked the `use_react_native!` function.
86
88
  ReactNativePodsUtils.detect_use_frameworks(current_target_definition)
@@ -0,0 +1,14 @@
1
+ #!/bin/sh
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
+ # Get the absolute path of this script
8
+ SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
9
+
10
+ REACT_NATIVE_CCACHE_CONFIGPATH=$SCRIPT_DIR/ccache.conf
11
+ # Provide our config file if none is already provided
12
+ export CCACHE_CONFIGPATH="${CCACHE_CONFIGPATH:-$REACT_NATIVE_CCACHE_CONFIGPATH}"
13
+
14
+ exec ccache clang++ "$@"
@@ -0,0 +1,14 @@
1
+ #!/bin/sh
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
+ # Get the absolute path of this script
8
+ SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
9
+
10
+ REACT_NATIVE_CCACHE_CONFIGPATH=$SCRIPT_DIR/ccache.conf
11
+ # Provide our config file if none is already provided
12
+ export CCACHE_CONFIGPATH="${CCACHE_CONFIGPATH:-$REACT_NATIVE_CCACHE_CONFIGPATH}"
13
+
14
+ exec ccache clang "$@"
@@ -0,0 +1,11 @@
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ #
3
+ # This source code is licensed under the MIT license found in the
4
+ # LICENSE file in the root directory of this source tree.
5
+
6
+ # See https://ccache.dev/manual/4.3.html#_configuration_options for details and available options
7
+
8
+ sloppiness = clang_index_store,file_stat_matches,include_file_ctime,include_file_mtime,ivfsoverlay,pch_defines,modules,system_headers,time_macros
9
+ file_clone = true
10
+ depend_mode = true
11
+ inode_cache = true
@@ -4,6 +4,11 @@
4
4
  # This source code is licensed under the MIT license found in the
5
5
  # LICENSE file in the root directory of this source tree.
6
6
 
7
+ if [ "$CI" ]; then
8
+ set -x
9
+ fi
10
+ set -e
11
+
7
12
  # Given a specific target, retrieve the right architecture for it
8
13
  # $1 the target you want to build. Allowed values: iphoneos, iphonesimulator, catalyst
9
14
  function get_architecture {
@@ -4,6 +4,11 @@
4
4
  # This source code is licensed under the MIT license found in the
5
5
  # LICENSE file in the root directory of this source tree.
6
6
 
7
+ if [ "$CI" ]; then
8
+ set -x
9
+ fi
10
+ set -e
11
+
7
12
  # shellcheck source=xplat/js/react-native-github/sdks/hermes-engine/utils/build-apple-framework.sh
8
13
  CURR_SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
9
14
  . "${CURR_SCRIPT_DIR}/build-apple-framework.sh"
Binary file
Binary file
Binary file
@@ -0,0 +1,38 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>NSPrivacyCollectedDataTypes</key>
6
+ <array>
7
+ </array>
8
+ <key>NSPrivacyAccessedAPITypes</key>
9
+ <array>
10
+ <dict>
11
+ <key>NSPrivacyAccessedAPIType</key>
12
+ <string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
13
+ <key>NSPrivacyAccessedAPITypeReasons</key>
14
+ <array>
15
+ <string>C617.1</string>
16
+ </array>
17
+ </dict>
18
+ <dict>
19
+ <key>NSPrivacyAccessedAPIType</key>
20
+ <string>NSPrivacyAccessedAPICategoryUserDefaults</string>
21
+ <key>NSPrivacyAccessedAPITypeReasons</key>
22
+ <array>
23
+ <string>CA92.1</string>
24
+ </array>
25
+ </dict>
26
+ <dict>
27
+ <key>NSPrivacyAccessedAPIType</key>
28
+ <string>NSPrivacyAccessedAPICategorySystemBootTime</string>
29
+ <key>NSPrivacyAccessedAPITypeReasons</key>
30
+ <array>
31
+ <string>35F9.1</string>
32
+ </array>
33
+ </dict>
34
+ </array>
35
+ <key>NSPrivacyTracking</key>
36
+ <false/>
37
+ </dict>
38
+ </plist>
@@ -11,18 +11,18 @@
11
11
  "test": "jest"
12
12
  },
13
13
  "dependencies": {
14
- "expo": "^49.0.7",
14
+ "expo": "^50.0.11",
15
15
  "react": "18.2.0",
16
- "react-native": "npm:react-native-tvos@0.74.0-0rc0"
16
+ "react-native": "npm:react-native-tvos@0.74.0-0rc2"
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.75",
23
- "@react-native/eslint-config": "0.74.75",
24
- "@react-native/metro-config": "0.74.75",
25
- "@react-native/typescript-config": "0.74.75",
22
+ "@react-native/babel-preset": "0.74.79",
23
+ "@react-native/eslint-config": "0.74.79",
24
+ "@react-native/metro-config": "0.74.79",
25
+ "@react-native/typescript-config": "0.74.79",
26
26
  "@types/react": "^18.2.6",
27
27
  "@types/react-test-renderer": "^18.0.0",
28
28
  "babel-jest": "^29.6.3",
@@ -22,8 +22,8 @@ Pod::Spec.new do |spec|
22
22
  spec.dependency 'boost'
23
23
  spec.dependency 'DoubleConversion'
24
24
  spec.dependency 'glog'
25
- spec.dependency 'fmt' , '~> 9.1.0'
26
- spec.compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_PTHREAD=1 -Wno-comma -Wno-shorten-64-to-32 -Wno-documentation -faligned-new'
25
+ spec.dependency "fmt", "9.1.0"
26
+ spec.compiler_flags = folly_compiler_flags
27
27
  spec.source_files = 'folly/String.cpp',
28
28
  'folly/Conv.cpp',
29
29
  'folly/Demangle.cpp',
@@ -1,23 +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.common.build;
9
-
10
- import com.facebook.react.BuildConfig;
11
-
12
- /**
13
- * Convenience class for accessing auto-generated BuildConfig so that a) other modules can just
14
- * depend on this module instead of having to manually depend on generating their own build config
15
- * and b) we don't have to deal with IntelliJ getting confused about the autogenerated BuildConfig
16
- * class all over the place.
17
- */
18
- public class ReactBuildConfig {
19
-
20
- public static final boolean DEBUG = BuildConfig.DEBUG;
21
- public static final boolean IS_INTERNAL_BUILD = BuildConfig.IS_INTERNAL_BUILD;
22
- public static final int EXOPACKAGE_FLAGS = BuildConfig.EXOPACKAGE_FLAGS;
23
- }