用于 YouTube 集成的 Cocoapods 安装

Cocoapods installation for YouTube integration

我需要安装 cocoapods 用于 youtube 集成,我用这个 link http://www.raywenderlich.com/64546/introduction-to-cocoapods-2 作为参考

这是我的播客文件

               //////////////////////////////////////////
# Uncomment this line to define a global platform for your project
# platform :ios, '7.0'

target 'testyoutube' do

pod "YouTube-Player-iOS-Helper", "~> 0.1"

end

target 'testyoutubeTests' do

end

                //////////////////////////////////////////

我在尝试安装时收到此错误代码 pods

Ansals-Mac-mini:testyoutube ansalantony$ pod install
Analyzing dependencies

CocoaPods 0.37.0.rc.1 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.

For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.

[!] Unable to find a specification for `YouTube-Player-iOS-Helper (~> 0.1)`
Ansals-Mac-mini:testyoutube ansalantony$ 

我已经安装了带有 pod 'AFNetworking'、'2.2.1' 的 pod,但是当我尝试安装 pod

时出现错误
"YouTube-Player-iOS-Helper", "~> 0.1"

用这一行替换你的 pod 行:

pod "youtube-ios-player-helper", "~> 0.1.1"

你可以使用这个 link 作为参考:https://github.com/youtube/youtube-ios-player-helper

使用这些 pod 命令代替旧命令 pod "youtube-ios-player-helper", "~> 0.1.1"

最新版本为0.1.4:

pod "youtube-ios-player-helper", "~> 0.1.4"

注意所有内容都是小写

Unable to find a specification for YouTube-Player-iOS-Helper (~> 0.1).

实际翻译为:no pod file available with the name 'YouTube-Player-iOS-Helper'。另外('~> 0.1')只代表pod文件的版本。

在这种情况下,您可以检查项目的 GitHub page 并获取最新版本的当前 pod 文件。

当前 pod 'youtube-ios-player-helper','~> 0.1.4' 可用。

您也可以只使用pod 'youtube-iso-player-helper'(不包括任何特定版本),当pod开发团队更新其版本时,它也会更新。