diff --git a/packages/react-native/scripts/cocoapods/__tests__/codegen_utils-test.rb b/packages/react-native/scripts/cocoapods/__tests__/codegen_utils-test.rb index d251e5b41c66bf..e81ac3974f49b0 100644 --- a/packages/react-native/scripts/cocoapods/__tests__/codegen_utils-test.rb +++ b/packages/react-native/scripts/cocoapods/__tests__/codegen_utils-test.rb @@ -29,8 +29,14 @@ def min_macos_version_supported end # macOS] +# [visionOS +def self.min_visionos_version_supported + return '1.0' +end +# visionOS] + def min_supported_versions - return { :ios => min_ios_version_supported, :osx => min_macos_version_supported } # [macOS] + return { :ios => min_ios_version_supported, :osx => min_macos_version_supported, :visionos => min_visionos_version_supported } # [macOS] # [visionOS] end class CodegenUtilsTests < Test::Unit::TestCase diff --git a/packages/react-native/scripts/cocoapods/helpers.rb b/packages/react-native/scripts/cocoapods/helpers.rb index 006848bf6ce76a..ac4608a1a2aac9 100644 --- a/packages/react-native/scripts/cocoapods/helpers.rb +++ b/packages/react-native/scripts/cocoapods/helpers.rb @@ -45,5 +45,10 @@ def self.min_macos_version_supported return '10.15' end # macOS] + # [visionOS + def self.min_visionos_version_supported + return '1.0' + end + # visionOS] end end diff --git a/packages/react-native/scripts/cocoapods/utils.rb b/packages/react-native/scripts/cocoapods/utils.rb index 63496f4cd5ec29..4564ebb00592c8 100644 --- a/packages/react-native/scripts/cocoapods/utils.rb +++ b/packages/react-native/scripts/cocoapods/utils.rb @@ -293,6 +293,7 @@ def self.updateOSDeploymentTarget(installer) target_installation_result.native_target.build_configurations.each do |config| config.build_settings["IPHONEOS_DEPLOYMENT_TARGET"] = Helpers::Constants.min_ios_version_supported config.build_settings["MACOSX_DEPLOYMENT_TARGET"] = Helpers::Constants.min_macos_version_supported # [macOS] + config.build_settings["XROS_DEPLOYMENT_TARGET"] = Helpers::Constants.min_visionos_version_supported # [visionOS] end end end diff --git a/packages/react-native/scripts/react_native_pods.rb b/packages/react-native/scripts/react_native_pods.rb index eaf4edc2147cc6..bacb05500c353e 100644 --- a/packages/react-native/scripts/react_native_pods.rb +++ b/packages/react-native/scripts/react_native_pods.rb @@ -47,11 +47,17 @@ def min_macos_version_supported end # macOS] +# [visionOS +def min_visionos_version_supported + return Helpers::Constants.min_visionos_version_supported +end +# visionOS] + # This function returns the min supported OS versions supported by React Native # By using this function, you won't have to manually change your Podfile # when we change the minimum version supported by the framework. def min_supported_versions - return { :ios => min_ios_version_supported, :osx => min_macos_version_supported} # [macOS] + return { :ios => min_ios_version_supported, :osx => min_macos_version_supported, :visionos => min_visionos_version_supported } # [macOS] [visionOS] end # This function prepares the project for React Native, before processing