【问题标题】:Cocoapods installation for YouTube integration用于 YouTube 集成的 Cocoapods 安装
【发布时间】:2015-07-08 14:16:17
【问题描述】:

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

这是我的 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

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

当我尝试安装 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$ 

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

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

【问题讨论】:

    标签: ios objective-c xcode cocoa-touch cocoapods


    【解决方案1】:

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

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

    【讨论】:

    • 干得好。谢谢!
    【解决方案2】:

    用这个替换你的pod 行:

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

    【讨论】:

      【解决方案3】:

      最新版本是0.1.4:

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

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

      【讨论】:

      • ~> 表示版本等于或大于。所以即使你写'~> 0.1'它仍然会下载最新版本(目前是0.1.5)。
      【解决方案4】:

      找不到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 开发团队更新其版本时更新。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-01-08
        • 1970-01-01
        • 2014-03-06
        • 1970-01-01
        • 2022-10-26
        • 2016-07-05
        • 1970-01-01
        • 2021-03-30
        相关资源
        最近更新 更多