我有一个包含多个目标的
Xcode项目.其中一个目标是tvOS平台.我的其他目标使用’youtube-iso-player-helper’框架,它不支持tvOS.我想要一个仅在iOS上包含播放器框架的Cocoapod Podfile.
这是我当前的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'
当我尝试更新我的pod时,出现以下错误:
[!] The platform of the target
Pods
(tvOS 9.0) is not compatible withyoutube-ios-player-helper (0.1.4)
,which does not supporttvos
.
显然,这是使用当前版本的Cocoapods.
所以,我需要知道我的Podfile所需的语法.
解决方法
这似乎对我有用:
target 'iOSAppTarget' do platform :ios,'8.0' pod 'PodForiOS' end target 'TVAppTarget' do platform :tvos,'9.0' pod 'PodForTV' end