Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[visionOS] Add min_visionos_version_supported to ruby methods #2050

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions packages/react-native/scripts/cocoapods/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions packages/react-native/scripts/cocoapods/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion packages/react-native/scripts/react_native_pods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading