0

Trying to use ParseKit in a project via cocoapods, but I am encountering linking errors.
All other cocoapods libraries work fine.

Podfile

platform :osx, '10.7'

pod 'ParseKit', '0.7'

Error

Undefined symbols for architecture x86_64:

  "_OBJC_CLASS_$_PKToken", referenced from:

      objc-class-ref in AppDelegate.o

  "_OBJC_CLASS_$_PKTokenizer", referenced from:

      objc-class-ref in AppDelegate.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)
aizaz
  • 3,056
  • 9
  • 25
  • 57
Mike
  • 67
  • 3
  • This is a link error. Are you sure you're linking to ParseKit in your Xcode Target's `Build Phases > Link Binary with Libraries`? – Todd Ditchendorf Jun 07 '13 at 18:39
  • I'm using cocoapod so I thought I shouldn't have to add ParseKit in the Link Binary with Libraries. I checked and it's not ParseKit isn't listed, but cocoapod is. Using http://stackoverflow.com/questions/9649537/how-to-embed-parsekit-as-a-private-framework-in-a-mac-app-bundle/9658158#9658158 works, but I wanted to use cocoapod. – Mike Jun 07 '13 at 21:01

1 Answers1

1

There is an issue with the 0.7 podspec for ParseKit, it doesn't quite include all the necessary files. I had the same issue and fixed it by changing the podspec to read.

s.source_files           =  'include/**/*.{h,m}', 'src/**/*.{h,m}', 'lib/MGTemplateEngine/MGTemplate*.{h,m}', 
                          'lib/MGTemplateEngine/ICUTemplateMatcher.{h,m}', 
                          'lib/MGTemplateEngine/*DeepMutableCopy.{h,m}'

You can clone the github repository and copy the podspec into it, make this change and then use the :path option for the pod to use the local copy

DanBrooker
  • 146
  • 1
  • 5
  • If this fixes the issue correctly it would be awesome if you could submit this change as a pull request to the [specs repo](http://github.com/CocoaPods/Specs/) – Keith Smiley Jul 30 '13 at 16:06
  • 1
    The specs repo podspec has been updated recently, it looks like it might have solved this also – DanBrooker Jul 30 '13 at 22:28