如何在podfile中使用源代码?

问题描述:

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

我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` 

试图通过赋予这样的:

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

您需要包括官方的CocoaPods来源: https://github.com/CocoaPods/Specs.git

Docs

The official CocoaPods source is implicit. Once you specify another source, then it will need to be included.

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

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