如何在Podfile中使用源?

9
我是iOS开发的新手。由于某种原因,我需要手动设置Cordova应用程序的podfile。在我的podfile中有GoogleCloudMessagingGGLInstanceID,现在我想安装一个Brightcove视频播放器库,其源代码为https://github.com/brightcove/BrightcoveSpecs.git。但是,当我在podfile顶部添加source时,似乎cocoapods也尝试从该源代码安装GoogleCloudMessaging

我的podfile:

source 'https://github.com/brightcove/BrightcoveSpecs.git'

use_frameworks!

platform :ios, '8.0'

target 'myapp' do
    pod 'Brightcove-Player-Core/dynamic'
    pod 'GoogleCloudMessaging'
    pod 'GGLInstanceID'
end

错误:

Analyzing dependencies
[!] Unable to find a specification for `GoogleCloudMessaging`
2个回答

29

您需要包含官方的CocoaPods源代码:

https://github.com/CocoaPods/Specs.git

文档

官方的CocoaPods源是隐式的。一旦您指定了其他来源,那么它就需要被包含在内。

所以我相信您的文件应该像这样工作:

source 'https://github.com/brightcove/BrightcoveSpecs.git'
source 'https://github.com/CocoaPods/Specs.git'

use_frameworks!

platform :ios, '8.0'

target 'myapp' do
    pod 'Brightcove-Player-Core/dynamic'
    pod 'GoogleCloudMessaging'
    pod 'GGLInstanceID'
end

6

尝试通过以下方式进行:

 pod "Brightcove-Player-FreeWheel", :git => 'https://github.com/brightcove/BrightcoveSpecs.git'

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接