min_ios_version_supported -> min_supported_versions (#39310)

Summary:
## Summary:

One of the most common diffs we have in React Native macOS is simply extending the `platforms` key Inside every pod spec to include macOS. React Native tvOS does the same to add tvOS. In the future, React Native may support visionOS, at which point we do the same thing again. Let's define a `min_supported_versions` hash that can be overridden at one place that is extensible to more platforms, instead of just specifying `min_ios_version_supported`.

Note: In doing this change, I have set it that `React-Hermes.podspec` doesn't build for macOS anymore. I think this is safe, since anyone using Hermes on macOS was probably using React Native macOS where we already have a diff to add macOS back?

## Changelog:

[IOS] [CHANGED] - Add min_supported_versions helper to cocoa pods scripts

Pull Request resolved: https://github.com/facebook/react-native/pull/39310

Test Plan: CI should pass.

Reviewed By: NickGerleman

Differential Revision: D49014109

Pulled By: dmytrorykun

fbshipit-source-id: d44fc7b750c70cc263a2c89502c022a0db9a4771
This commit is contained in:
Saad Najmi
2023-09-07 03:16:23 -07:00
committed by Facebook GitHub Bot
parent 4d9bd90401
commit 1b78da8b43
60 changed files with 72 additions and 65 deletions
@@ -14,7 +14,7 @@ Pod::Spec.new do |s|
s.description = "NativeCxxModuleExample"
s.homepage = "https://github.com/facebook/react-native.git"
s.license = "MIT"
s.platforms = { :ios => min_ios_version_supported }
s.platforms = min_supported_versions
s.compiler_flags = '-Wno-nullability-completeness'
s.author = "Meta Platforms, Inc. and its affiliates"
s.source = { :git => "https://github.com/facebook/react-native.git", :tag => "#{s.version}" }