Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
f710e2e0
Commit
f710e2e0
authored
Sep 17, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move content from README to the wiki and cleanup.
parent
f263e298
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
140 deletions
+4
-140
README.md
README.md
+4
-140
No files found.
README.md
View file @
f710e2e0
...
@@ -10,6 +10,8 @@ unify the way in which we deal with them.
...
@@ -10,6 +10,8 @@ unify the way in which we deal with them.
CocoaPods will:
CocoaPods will:
*
Calculate the right set of versions of all of your project’s dependencies.
*
Calculate the right set of versions of all of your project’s dependencies.
_Currently the resolver is very naive and any conflicts will have to be solved
by you, the user. This will change in the future._
*
Install dependencies.
*
Install dependencies.
*
Set them up to be build as part of a ‘dependency’ static library, which your
*
Set them up to be build as part of a ‘dependency’ static library, which your
project links against.
project links against.
...
@@ -21,147 +23,11 @@ Installing CocoaPods
...
@@ -21,147 +23,11 @@ Installing CocoaPods
You’ll need MacRuby. CocoaPods itself installs through RubyGems, the Ruby
You’ll need MacRuby. CocoaPods itself installs through RubyGems, the Ruby
package manager:
package manager:
$ brew install macruby
[TODO There's actually no MacRuby homebrew formula]
$ brew install macruby
$ macgem install cocoa
-
pods
$ macgem install cocoapods
$ pod setup
$ pod setup
Making a Pod
============
A manifest that describes the library and its dependencies is called a Pod.
Consider you want to create a new library that retrieves the latest price of
your favorite ice cream called IcePop.
$ pod spec create IcePop
$ cd IcePop
$ tree .
- IcePop
|- IcePop.podspec
|- LICENSE
|- README
|\ Source
| | - IcePop.h
| | - IcePop.m
|- Test
You can also initialize a Pod for an existing library, which will only create a
`.podspec`
file.
$ cd IcePop
$ pod spec init IcePop
Anatomy of a PodSpec manifest
=============================
class IcePop < Pod::Spec
version '1.0.0' # 1
summary 'A library that retrieves the current price of your favorite ice cream.' # 2
author 'Eloy Durán' => 'eloy.de.enige@gmail.com' # 3
source :git => 'https://github.com/alloy/ice-pop.git' # 4
dependency 'AsyncSocket', '~> 0.6' # 5
end
1.
The version of this pod.
2.
A short summary of this pod’s description.
3.
The author of this pod and his/her email address.
4.
Where to retrieve this pod’s source.
5.
Defines a dependency of the library itself, with a version requirement
of 0.6 trough 0.9.
See the
[
example PodSpec file
][
example
]
for a full list of the available
attributes and more detailed information.
Sharing a Pod
=============
CocoaPod uses git repositories with
`.podspec`
files as its database. In order
to share your pod, its
`.podspec`
file will have to be added to such a repo.
$ pod repo add my-spec-repo http://github.com/alloy/spec-repo.git
$ pod push my-spec-repo
This will:
1.
Validate the
`.podspec`
file.
1.
Update the clone of the local spec-repo called
`my-spec-repo`
.
2.
Add the
`.podspec`
file to the spec-repo, namespaced by name and version.
3.
Push the changes from the local spec-repo to its remote.
Share with everyone
===================
CocoaPods, itself, has a
[
spec-repo
][
master
]
, called the
`master`
spec-repo.
This repo is meant as a central public place for any open-source pod. All
installations of CocoaPods will have a local clone of this repo.
However, normally you will have read-only access only. Thus to get a PodSpec
into the
`master`
spec-repo you will have to push to your own fork and send
a pull request.
Once your first PodSpec has been merged, you will be given push access to the
`master`
spec-repo and are allowed to update and add
`.podspec`
files at your
own leisure.
Once you receive push acces, you will have to change your
`master`
spec-repo’s
remote URL with:
$ pod repo change master git@github.com:alloy/cocoa-pod-specs.git
Commands overview
=================
### Setup
$ pod help setup
pod setup
Creates a directory at `~/.cocoa-pods' which will hold your spec-repos.
This is where it will create a clone of the public `master' spec-repo.
### Managing PodSpec files
$ pod help spec
pod spec create NAME
Creates a directory for your new pod, named `NAME', with a default
directory structure and accompanying `NAME.podspec'.
pod spec init NAME
Creates a PodSpec, in the current working dir, called `NAME.podspec'.
Use this for existing libraries.
pod spec lint NAME
Validates `NAME.podspec' from a local spec-repo. In case `NAME' is
omitted, it defaults to the PodSpec in the current working dir.
pod spec push REMOTE
Validates `NAME.podspec' in the current working dir, copies it to the
local clone of the `REMOTE' spec-repo, and pushes it to the `REMOTE'
spec-repo. In case `REMOTE' is omitted, it defaults to `master'.
### Managing spec-repos
$ pod help repo
pod repo add NAME URL
Clones `URL' in the local spec-repos directory at `~/.cocoa-pods'. The
remote can later be referred to by `NAME'.
pod repo update NAME
Updates the local clone of the spec-repo `NAME'.
pod repo change NAME URL
Changes the git remote of local spec-repo `NAME' to `URL'.
pod repo cd NAME
Changes the current working dir to the local spec-repo `NAME'.
Contact
Contact
=======
=======
...
@@ -180,5 +46,3 @@ for more info.
...
@@ -180,5 +46,3 @@ for more info.
[
license
]:
cocoa-pods/blob/master/LICENSE
[
license
]:
cocoa-pods/blob/master/LICENSE
[
example
]:
cocoa-pods/blob/master/examples/PodSpec.podspec
[
master
]:
http://github.com/alloy/cocoa-pod-specs
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment