Sufi Al Hussaini Sufi Al Hussaini - 6 months ago 34
Swift Question

CDPieMenu (cocoapod) in swift

I'm trying to add CDPieMenu to my swift project using a

.podspec
gist I found here.

I downloaded the podspec locally & added it to my podfile like so:

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


Here's the 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


I ran
pod update
and everything worked fine and it seems to have been installed.

However, I'm unable to reference it from my project files now.
Did I miss something?

EDIT 1:



I forgot to mention I have already setup a bridging-header and added
CDPieMenu
headers to it.

Project-bridging-header:

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


EDIT 2:



I just checked and it seems the pod isn't installed at all. There isn't a
CDPieMenu
in the
Pods
directory.
But
pod update
didn't throw any errors.

Answer

I had two problems here, one of which I was able to resolve using @whatever38's suggestion, i.e. I was using pod update instead of pod install.

The other problem was that I needed to specify the path to my podspec file in my Podfile. I was doing this by specifying the :path => parameter, whereas I should've instead used the :podspec => parameter. So, my Podfile entry for CDPieMenu should look like so:

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