Apple TV Cocoapods support

Summary:
**Motivation**

Support Apple TV for people adding React Native to their projects using Cocoapods.

**Test plan**

Working test project at https://github.com/dlowder-salesforce/react-native-tvos-cocoapods-test
Closes https://github.com/facebook/react-native/pull/15065

Differential Revision: D5443791

Pulled By: javache

fbshipit-source-id: dc46a72df0d73a0049f1c3f9368658e5f3d1ecb8
This commit is contained in:
dlowder-salesforce 2017-07-18 15:03:37 -07:00 committed by Facebook Github Bot
parent 6e68f2d954
commit f082e6cffd
5 changed files with 13 additions and 6 deletions

View File

@ -36,7 +36,7 @@ Pod::Spec.new do |s|
s.source = source
s.default_subspec = "Core"
s.requires_arc = true
s.platform = :ios, "8.0"
s.platforms = { :ios => "8.0", :tvos => "9.2" }
s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++14" }
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs", "PATENTS"
s.cocoapods_version = ">= 1.2.0"
@ -48,11 +48,18 @@ Pod::Spec.new do |s|
"IntegrationTests/*",
"React/DevSupport/*",
"React/Inspector/*",
"React/**/RCTTVView.*",
"ReactCommon/yoga/*",
"React/Cxx*/*",
"React/Base/RCTBatchedBridge.mm",
"React/Executors/*"
ss.ios.exclude_files = "React/**/RCTTVView.*"
ss.tvos.exclude_files = "React/Modules/RCTClipboard*",
"React/Views/RCTDatePicker*",
"React/Views/RCTPicker*",
"React/Views/RCTRefreshControl*",
"React/Views/RCTSlider*",
"React/Views/RCTSwitch*",
"React/Views/RCTWebView*"
ss.header_dir = "React"
ss.framework = "JavaScriptCore"
ss.libraries = "stdc++"

View File

@ -34,7 +34,7 @@ Pod::Spec.new do |spec|
]
# Pinning to the same version as React.podspec.
spec.platform = :ios, "8.0"
spec.platforms = { :ios => "8.0", :tvos => "9.2" }
# Set this environment variable when not using the `:path` option to install the pod.
# E.g. when publishing this spec to a spec repo.

View File

@ -12,6 +12,6 @@ Pod::Spec.new do |spec|
spec.source_files = 'double-conversion/*.{h,cc}'
# Pinning to the same version as React.podspec.
spec.platform = :ios, '8.0'
spec.platforms = { :ios => "8.0", :tvos => "9.2" }
end

View File

@ -31,5 +31,5 @@ Pod::Spec.new do |spec|
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\"" }
# Pinning to the same version as React.podspec.
spec.platform = :ios, '8.0'
spec.platforms = { :ios => "8.0", :tvos => "9.2" }
end

View File

@ -27,6 +27,6 @@ Pod::Spec.new do |spec|
"HEADER_SEARCH_PATHS" => "$(PODS_TARGET_SRCROOT)/src" }
# Pinning to the same version as React.podspec.
spec.platform = :ios, "8.0"
spec.platforms = { :ios => "8.0", :tvos => "9.2" }
end