加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ios – 仅适用于指定平台的Cocoapod pod

发布时间:2020-12-14 17:34:22 所属栏目:百科 来源:网络整理
导读:我有一个包含多个目标的 Xcode项目.其中一个目标是tvOS平台.我的其他目标使用’youtube-iso-player-helper’框架,它不支持tvOS.我想要一个仅在iOS上包含播放器框架的Cocoapod Podfile. 这是我当前的Podfile: source 'https://github.com/CocoaPods/Specs.gi
我有一个包含多个目标的 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 with youtube-ios-player-helper (0.1.4),which does not support tvos.

显然,这是使用当前版本的Cocoapods.

所以,我需要知道我的Podfile所需的语法.

解决方法

这似乎对我有用:

target 'iOSAppTarget' do
  platform :ios,'8.0'
  pod 'PodForiOS'
end

target 'TVAppTarget' do
  platform :tvos,'9.0'
  pod 'PodForTV'
end

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读