CDPieMenu(cocoapod)迅速

时间:2016-05-19 11:14:31

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

我正在尝试使用.podspec要点CDPieMenu添加here到我的快速项目中。

我在本地下载了podspec&将它添加到我的podfile中,如下所示:

  pod 'CDPieMenu', :path => '~/Documents/Project/CDPieMenu.podspec'

这是podspec:

Pod::Spec.new do |s|
    s.name     = 'CDPieMenu'
    s.version  = '0.1'
    s.license  = 'MIT License'
    s.summary  = 'Fully and easily customizable rotary wheel control also called pie menu for iPhone and iPad.'
    s.homepage = 'https://github.com/wczekalski/CDPieMenu'
    s.author   = { 'W. Czekalski'    => 'me@wczekalski.com' }

    s.source   = { :git => 'https://github.com/wczekalski/CDPieMenu.git', :commit => '2f49362' }
    s.source_files = 'Wheel'

    s.description = 'Fully and easily customizable rotary wheel control also called pie menu for iPhone and iPad.'
    'Very similar to the control in Convertbot. As the only one in the internet it rotates with inertia/mementum.'
    'Drawn using CoreGraphics without any images.'

    s.platform = :ios
    s.frameworks = 'AudioToolbox', 'QuartzCore'
    s.requires_arc = true
end

我跑pod update,一切正常,似乎已安装。

但是,我现在无法从我的项目文件中引用它。 我错过了什么吗?

编辑1:

我忘了提及我已经设置了一个桥接标头,并为其添加了CDPieMenu标头。

项目桥接报头:

#import "CDCircle.h"
#import "CDCircleGestureRecognizer.h"
#import "CDCircleOverlayView.h"
#import "CDCircleThumb.h"
#import "CDIconView.h"
#import "Common.h"

编辑2:

我刚检查过,似乎根本没有安装pod。 CDPieMenu目录中没有Pods。 但是pod update没有抛出任何错误。

2 个答案:

答案 0 :(得分:1)

尝试“pod install”而不是“pod update”。

编辑:

不要忘记使用.xcworkspace文件打开您的项目。

答案 1 :(得分:1)

我在这里遇到两个问题,其中一个我可以使用@ whatever38的建议来解决,即我使用的是pod update而不是pod install

另一个问题是我需要在Podfile中指定podspec文件的路径。我这样做是通过指定:path =>参数来实现的,而我应该使用:podspec =>参数。 因此,Podfile的{​​{1}}条目应该如此:

CDPieMenu