xcode 用于 YouTube 集成的 Cocoapods 安装

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29941288/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 07:05:28  来源:igfitidea点击:

Cocoapods installation for YouTube integration

iosobjective-cxcodecocoa-touchcocoapods

提问by Ansal Antony

I need to install cocoapods for youtube integration,i used this link http://www.raywenderlich.com/64546/introduction-to-cocoapods-2for reference

我需要安装 cocoapods 以进行 youtube 集成,我使用此链接http://www.raywenderlich.com/64546/introduction-to-cocoapods-2作为参考

This is my podfile

这是我的 podfile

               //////////////////////////////////////////
# 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

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

and i am getting this error code when i tried to install pods

当我尝试安装 Pod 时,我收到此错误代码

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$ 

I have installed pod with pod 'AFNetworking', '2.2.1' but I am getting error when I'm trying to install pod

我已经安装了带有 pod 'AFNetworking', '2.2.1' 的 pod,但是当我尝试安装 pod 时出现错误

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

回答by SARATH SASI

u can use this link for referance : https://github.com/youtube/youtube-ios-player-helper

您可以使用此链接作为参考:https: //github.com/youtube/youtube-ios-player-helper

use these pod command instead of the old one pod "youtube-ios-player-helper", "~> 0.1.1"

使用这些 pod 命令而不是旧的 pod "youtube-ios-player-helper", "~> 0.1.1"

回答by Eric Aya

Replace your podline with this one:

pod用这个替换你的行:

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

回答by linker

The latest version is 0.1.4:

最新版本是 0.1.4:

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

Notice that everything is lowercase.

请注意,所有内容都是小写的

回答by shivendra pandey

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

无法找到YouTube-Player-iOS-Helper (~> 0.1).

It actually translates to: no pod file available with the name 'YouTube-Player-iOS-Helper'. Also ('~> 0.1')represents only the version of the pod file.

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

In this case you can check the the project's GitHub pageand get the current pod file with latest version.

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

Currently pod 'youtube-ios-player-helper', '~> 0.1.4'is available.

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

You can also use only pod 'youtube-iso-player-helper'(without including any specific version) and it will get updated when its version gets updated by the pod development team.

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