Files
react-native/packages/rn-tester/NativeCxxModuleExample/NativeCxxModuleExample.podspec
T
Saad Najmi 1b78da8b43 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
2023-09-07 03:16:23 -07:00

32 lines
1.1 KiB
Ruby

# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
require "json"
package = JSON.parse(File.read(File.join(__dir__, "../package.json")))
Pod::Spec.new do |s|
s.name = "NativeCxxModuleExample"
s.version = package["version"]
s.summary = package["description"]
s.description = "NativeCxxModuleExample"
s.homepage = "https://github.com/facebook/react-native.git"
s.license = "MIT"
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}" }
s.source_files = "**/*.{h,cpp}"
s.requires_arc = true
s.pod_target_xcconfig = {
"USE_HEADERMAP" => "YES",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
}
install_modules_dependencies(s)
s.dependency "ReactCommon/turbomodule/core"
end