Cocoapod Pod仅适用于指定平台 [英] Cocoapod pod only for a specified platform
问题描述
我有一个带有多个目标的Xcode项目。这些目标之一是针对tvOS平台的。我的其他目标使用了不支持tvOS的 youtube-iso-player-helper框架。我想要一个Cocoapod Podfile,其中仅包含iOS上的播放器框架。
I have an Xcode project with multiple targets. One of those targets targets the tvOS platform. My other targets make use of the 'youtube-iso-player-helper' framework, which does not support tvOS. I want to have a Cocoapod Podfile that includes the player framework only on iOS.
这是我当前的Podfile:
Here is my current Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
platform :tvos, '9.0'
use_frameworks!
pod 'SVGgh'
pod "youtube-ios-player-helper", "~> 0.1"
xcodeproj 'MyProject.xcodeproj'
当我尝试更新吊舱时,出现以下错误:
When I try to update my pods, I get the following error:
[!]目标
Pods
(tvOS 9.0)的平台与<$ c $不兼容c> youtube-ios-player-helper(0.1.4),不支持tvos
。
[!] The platform of the target
Pods
(tvOS 9.0) is not compatible withyoutube-ios-player-helper (0.1.4)
, which does not supporttvos
.
很显然,这是使用当前版本的Cocoapods。
Obviously, this is using the current version of Cocoapods.
因此,我需要知道我的Podfile。
So, I need to know the syntax required for my Podfile.
推荐答案
这似乎对我有用:
target 'iOSAppTarget' do
platform :ios, '8.0'
pod 'PodForiOS'
end
target 'TVAppTarget' do
platform :tvos, '9.0'
pod 'PodForTV'
end
这篇关于Cocoapod Pod仅适用于指定平台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!