Skip to content

Commit cf0beae

Browse files
committed
Set macOS deployment target
1 parent b77bf18 commit cf0beae

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

packages/react-native/scripts/cocoapods/__tests__/codegen_utils-test.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,14 @@ def min_ios_version_supported
2323
return '12.4'
2424
end
2525

26+
# [macOS
27+
def min_macos_version_supported
28+
return '10.15'
29+
end
30+
# macOS]
31+
2632
def min_supported_versions
27-
return { :ios => min_ios_version_supported }
33+
return { :ios => min_ios_version_supported, :osx => min_macos_version_supported } # [macOS]
2834
end
2935

3036
class CodegenUtilsTests < Test::Unit::TestCase

packages/react-native/scripts/cocoapods/helpers.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,10 @@ class Constants
4040
def self.min_ios_version_supported
4141
return '12.4'
4242
end
43+
# [macOS
44+
def self.min_macos_version_supported
45+
return '10.15'
46+
end
47+
# macOS]
4348
end
4449
end

packages/react-native/scripts/cocoapods/utils.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ def self.updateOSDeploymentTarget(installer)
274274
end
275275
target_installation_result.native_target.build_configurations.each do |config|
276276
config.build_settings["IPHONEOS_DEPLOYMENT_TARGET"] = Helpers::Constants.min_ios_version_supported
277+
config.build_settings["MACOSX_DEPLOYMENT_TARGET"] = Helpers::Constants.min_macos_version_supported # [macOS]
277278
end
278279
end
279280
end

packages/react-native/scripts/react_native_pods.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,17 @@ def min_ios_version_supported
3939
return Helpers::Constants.min_ios_version_supported
4040
end
4141

42+
# [macOS
43+
def min_macos_version_supported
44+
return Helpers::Constants.min_macos_version_supported
45+
end
46+
# macOS]
47+
4248
# This function returns the min supported OS versions supported by React Native
4349
# By using this function, you won't have to manually change your Podfile
4450
# when we change the minimum version supported by the framework.
4551
def min_supported_versions
46-
return { :ios => min_ios_version_supported }
52+
return { :ios => min_ios_version_supported, :osx => min_macos_version_supported } # [macOS]
4753
end
4854

4955
# This function prepares the project for React Native, before processing

0 commit comments

Comments
 (0)