Question

I would like to use this IOS project in cocoapod:

https://code.google.com/p/plcrashreporter/

is it simple to create a podspec ? has somebody already done this somewhere ?

Thx !

Was it helpful?

Solution

It is not too hard to do. Have a look at some other podspecs to see how it works.

https://github.com/CocoaPods/Specs

There is also documentation of the format: https://github.com/CocoaPods/CocoaPods/wiki/The-podspec-format

Also once you get it working you can submit your podspec so that everyone can use it. There is information on how to do this on the homepage http://cocoapods.org/

OTHER TIPS

Surely many people have done this. This is the way to do so:

Pod::Spec.new do |s|
  s.name = 'MyPod'
  s.version = '1.0'
  s.authors = {'Your Name Here' => 'you@example.com'}
  s.homepage = 'http://www.example.com'
  s.summary = 'My pod is awesome'
  s.source = {:git => 'https://git.example.com/MyPodRepo', :revision => '1e16eee5c4e2'}
  s.platform = :ios
  s.source_files =  'MyPodSubdir/**/*.{h,m}'
  s.frameworks = 'QuartzCore'
  s.ios.preserve_paths = 'MyPodSubdir/Externals/*.framework'
  s.ios.vendored_frameworks = 'MyPodSubdir/Externals/CrashReporter.framework'
  s.ios.resource = 'MyPodSubdir/Externals/CrashReporter.framework'
  s.ios.xcconfig = { 'LD_RUNPATH_SEARCH_PATHS' => '"$(PODS_ROOT)/MyPod/MyPodSubdir/Externals"' }
end

It is the last 4 lines in the pod spec that allows you to have a pod which uses PLCrashReporter.

Found in this blog entry about PLCrashReporter and CocoaPods.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top