Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 71 lines (40 sloc) 2.838 kB
80ba176 @alloy Add a README.
alloy authored
1 # A repository of CocoaPods specifications.
2
3 [![Build Status](https://secure.travis-ci.org/CocoaPods/Specs.png?branch=master)](http://travis-ci.org/CocoaPods/Specs)
4
5 This repository contains specifications of open-source Objective-C libraries, which are used by [CocoaPods](https://github.com/CocoaPods/CocoaPods) to manage library dependencies for your Xcode project.
6
7
9cfa712 @fabiopelosin [Readme] Update.
fabiopelosin authored
8 ## Creating specifications
80ba176 @alloy Add a README.
alloy authored
9
10 First of all, you need to install the tools.
11
9cfa712 @fabiopelosin [Readme] Update.
fabiopelosin authored
12 ```console
13 $ [sudo] gem install cocoapods
14 ```
80ba176 @alloy Add a README.
alloy authored
15
9cfa712 @fabiopelosin [Readme] Update.
fabiopelosin authored
16 Then you can have the CocoaPods `pod` command create a stub specification:
0446b47 @alloy Add part about version tags and asking the library author about them …
alloy authored
17
9cfa712 @fabiopelosin [Readme] Update.
fabiopelosin authored
18 ```console
19 $ pod spec create Bananas
20 $ pod spec create https://github.com/Bananas/Bananas # For libraries hosted on GitHub
21 ```
0446b47 @alloy Add part about version tags and asking the library author about them …
alloy authored
22
9cfa712 @fabiopelosin [Readme] Update.
fabiopelosin authored
23 Now edit the stub specification following the explanations therein contained. This file is a [Ruby](http://www.ruby-lang.org/) source file.
80ba176 @alloy Add a README.
alloy authored
24
9cfa712 @fabiopelosin [Readme] Update.
fabiopelosin authored
25 ```console
26 $ vim Bananas.podspec
27 ```
80ba176 @alloy Add a README.
alloy authored
28
5431c98 @fabiopelosin [Readme] Update.
fabiopelosin authored
29 You can verify the specification file with the lint command. This command checks for common errors and whether the pod builds on the platforms that it supports.
80ba176 @alloy Add a README.
alloy authored
30
9cfa712 @fabiopelosin [Readme] Update.
fabiopelosin authored
31 ```console
32 $ pod spec lint Bananas.podspec --verbose
33 ```
80ba176 @alloy Add a README.
alloy authored
34
9cfa712 @fabiopelosin [Readme] Update.
fabiopelosin authored
35 Once you have created a working specification create a pull request. Once accepted, you will receive push access to this repo. Feel free to push updates, specs for other libraries you use, and participate in other tickets.
80ba176 @alloy Add a README.
alloy authored
36
9cfa712 @fabiopelosin [Readme] Update.
fabiopelosin authored
37 If you have push access you can publish all the podspecs in a working directory.
80ba176 @alloy Add a README.
alloy authored
38
9cfa712 @fabiopelosin [Readme] Update.
fabiopelosin authored
39 ```console
40 $ pod setup --push # Run only once
41 $ pod push master
42 ```
80ba176 @alloy Add a README.
alloy authored
43
44
9cfa712 @fabiopelosin [Readme] Update.
fabiopelosin authored
45 ### Namespacing
637ebd1 @subdigital Mention the rake lint task in the readme
subdigital authored
46
9cfa712 @fabiopelosin [Readme] Update.
fabiopelosin authored
47 A specification file has to be namespaced by the library’s name and the version for which the specification is meant. For instance, the directory for a library named ‘Bananas’ with version ‘1.2.3’ should be:
637ebd1 @subdigital Mention the rake lint task in the readme
subdigital authored
48
9cfa712 @fabiopelosin [Readme] Update.
fabiopelosin authored
49 $ mkdir -p Bananas/1.2.3
50 $ cd Bananas/1.2.3
637ebd1 @subdigital Mention the rake lint task in the readme
subdigital authored
51
9cfa712 @fabiopelosin [Readme] Update.
fabiopelosin authored
52 ### Versioning
53
54 CocoaPods uses a versioning scheme known as [Semantic Versioning](http://semver.org/). See this [example](https://github.com/CocoaPods/Specs/wiki/Cross-dependencies-resolution-example) for more info on why this scheme is used.
55
56 If the library, that you are creating a specification for, does not yet have any tagged versions in its repo, then it’s best to start with the lowest version ‘0.0.1’, which will ensure that once the author does add tagged versions they will be equal or higher than ‘0.0.1’. It is _your_ responsibility to ask the author of the library to tag versions, luckily we have [a template](https://github.com/CocoaPods/Specs/wiki/%22Please-add-semantic-version-tags%22-issue-template) for this.
57
58 ## Check the entire repo
80ba176 @alloy Add a README.
alloy authored
59
beda002 @siuying add Hint on how to test the podspec locally
siuying authored
60 You can also verify the entire set by running the rake task.
61
62 $ rake lint
63
64 _(Note: this is run on every commit by [Travis](http://travis-ci.org/#!/CocoaPods/Specs))_
80ba176 @alloy Add a README.
alloy authored
65
9cfa712 @fabiopelosin [Readme] Update.
fabiopelosin authored
66 ## License
80ba176 @alloy Add a README.
alloy authored
67
68 These specifications and CocoaPods are available under the [MIT license](http://www.opensource.org/licenses/mit-license.php).
9cfa712 @fabiopelosin [Readme] Update.
fabiopelosin authored
69
70
Something went wrong with that request. Please try again.