-
Notifications
You must be signed in to change notification settings - Fork 1
Podspec howto
This is a short overview of what a Podspec is, designed to help you get going writing your own Podspecs. The full Podspec Specification (spec-spec?) is on the CocoaPods wiki.
Pod::Spec.new do |s|
s.name = 'PodName'
s.version = 'X.Y.Z'
s.summary = '30-seconds-in-an-elevator-evangelizing.'
s.license = 'Chicken Dance License'
s.homepage = 'http://new.example.com/'
s.author = {
'Author 0' => '[email protected]',
'Author 1' => '[email protected]'
If no email is provided, for example, if you don't want your email public or the person you're submitting a Pod on behalf of doesn't want his or her email public, the pattern is to use an empty string.
}
s.source = {
:git => 'https://github.com/host/repo.git',
:tag => 'X.Y.Z'
# :branch => 'master'
# :commit => 'd915e3adbfb05c469d1aa54c33075727ea86595e'
Please push up tags to identify versions, since this is the preferred way. You can use branches for tracking master development in a pod if you must, but please don't put that into the master repo.
Tracking by commit is possible, but please, it's better to use a tag. Go bug the repository owner to push up a tag if you must.
}
s.description = %{
You've already talked to them for 30 seconds in that elevator.
They're interested. Now, bring it on home by scheduling a meeting
with them in Outlook, where you'll present to them why this is
absolutely them coolest thing they'll ever use. People want your
stuff, after all. Tell them why they want it.
}
s.source_files = 'PodName/*.{h,m}',
# or you could use a Rake-style FileList invocation:
s.source_files = FileList['PodName/*.*'].exclude(/*\.pch$/)
The source files are included into the Pods project and compiled into
libpods.a
. I suggest testing that all the necessary files have been
included by making a quick project and then installing the pod.
s.clean_paths = '*.xcodeproj', '*Tests'
These are files that you don't want included into the final configuration. Things like examples should be cleaned out to make it nice and lean for the consumer. However, it's a good idea to leave in your documentation and license files.
if config.ios?
# you can put any kind of config in here.
else
# or your can put any kind of config in here.
end
s.library = 'libxml2' # or something, if you need it
s.frameworks = 'Foundation'
s.dependency 'Reachability', '~> 2.0'
end