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
da3e4ea5
Commit
da3e4ea5
authored
Aug 13, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup
parent
6b0c9389
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
22 deletions
+26
-22
README.md
README.md
+17
-17
commands.md
commands.md
+9
-5
No files found.
README.md
View file @
da3e4ea5
...
@@ -30,12 +30,12 @@ A manifest that describes the library and its dependencies is called a Pod.
...
@@ -30,12 +30,12 @@ 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
Consider you want to create a new library that retrieves the latest price of
your favorite ice cream called IcePop.
your favorite ice cream called IcePop.
$ pod create IcePop
$ pod
spec
create IcePop
$ cd IcePop
$ cd IcePop
$ tree .
$ tree .
- IcePop
- IcePop
|- IcePop.podspec
|- LICENSE
|- LICENSE
|- PodSpec
|- README
|- README
|\ Source
|\ Source
| | - IcePop.h
| | - IcePop.h
...
@@ -43,10 +43,10 @@ your favorite ice cream called IcePop.
...
@@ -43,10 +43,10 @@ your favorite ice cream called IcePop.
|- Test
|- Test
You can also initialize a Pod for an existing library, which will only create a
You can also initialize a Pod for an existing library, which will only create a
PodSpec manifest
.
`.podspec`
file
.
$ cd IcePop
$ cd IcePop
$ pod
init
$ pod
spec init IcePop
Anatomy of a PodSpec manifest
Anatomy of a PodSpec manifest
...
@@ -74,19 +74,19 @@ attributes and more info.
...
@@ -74,19 +74,19 @@ attributes and more info.
Sharing a Pod
Sharing a Pod
=============
=============
CocoaPod uses git repositories with
PodSpec.rb files as it’
s database. In order
CocoaPod uses git repositories with
`.podspec`
files as it
s database. In order
to share your pod, its
PodSpec.rb
file will have to be added to such a repo.
to share your pod, its
`.podspec`
file will have to be added to such a repo.
Luckily
CocoaPod provides commands to facilitate this:
CocoaPod provides commands to facilitate this:
$ pod
spec-
repo add my-spec-repo http://github.com/alloy/spec-repo.git
$ pod repo add my-spec-repo http://github.com/alloy/spec-repo.git
$ pod push my-spec-repo
$ pod push my-spec-repo
This will:
This will:
1.
Update the clone of the PodSpec manifest files repo
.
1.
Validate the
`.podspec`
file
.
2.
Add the PodSpec.rb file to the repo in a directory with the pod’s name and a
1.
Update the clone of the local spec-repo called
`my-spec-repo`
.
subdirectory for each
version.
2.
Add the
`.podspec`
file to the spec-repo, namespaced by name and
version.
3.
Push the changes from the local
clone of your
spec-repo to its remote.
3.
Push the changes from the local spec-repo to its remote.
Share with everyone
Share with everyone
...
@@ -97,18 +97,18 @@ called the ‘master’ spec-repo. This repo is meant as a central public place
...
@@ -97,18 +97,18 @@ called the ‘master’ spec-repo. This repo is meant as a central public place
any open-source pod. All installations of CocoaPods will have a local clone of
any open-source pod. All installations of CocoaPods will have a local clone of
this repo.
this repo.
However, normally you will have read-only access only. Thus
,
to get a PodSpec
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
of it a
nd
into the ‘master’ spec-repo you will have to push to your own fork
and se
nd
send
a pull request.
a pull request.
Once your first PodSpec has been merged, you will be given push access to the
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.rb
files at your
‘master’ spec-repo and are allowed to update and add
`.podspec`
files at your
own leisure.
own leisure.
Once you receive push acces, you will have to change your
`master`
spec-repo’s
Once you receive push acces, you will have to change your
`master`
spec-repo’s
remote URL with:
remote URL with:
$ pod
spec-repo master change
https://github.com/alloc/cocoa-pod-specs.git # TODO real URL
$ pod
repo change master
https://github.com/alloc/cocoa-pod-specs.git # TODO real URL
[
example
]:
PodSpec.example.rb
[
example
]:
PodSpec.example.rb
commands.md
View file @
da3e4ea5
...
@@ -2,15 +2,17 @@ Setup
...
@@ -2,15 +2,17 @@ Setup
=====
=====
$ pod help setup
$ pod help setup
$ pod setup
This command will create a directory at
`~/.cocoa-pods`
which will hold your
pod setup
spec-repos. In addition it will create a clone of the public ‘master’ spec-repo.
Creates a directory at `~/.cocoa-pods` which will hold your spec-repos.
In addition, it will create a clone of the public ‘master’ spec-repo.
Managing PodSpec files
Managing PodSpec files
======================
======================
$ pod help spec
$ pod help spec
pod spec create NAME
pod spec create NAME
Creates a directory for your new pod, named `NAME', with a default
Creates a directory for your new pod, named `NAME', with a default
directory structure and accompanying `NAME.podspec'.
directory structure and accompanying `NAME.podspec'.
...
@@ -29,8 +31,10 @@ Managing PodSpec files
...
@@ -29,8 +31,10 @@ Managing PodSpec files
spec-repo. In case `REMOTE' is omitted, it defaults to `master'.
spec-repo. In case `REMOTE' is omitted, it defaults to `master'.
Manage spec-repos
Managing spec-repos
=================
===================
$ pod help repo
pod repo add NAME URL
pod repo add NAME URL
Clones `URL' in the local spec-repos directory at ~/.cocoa-pods. The
Clones `URL' in the local spec-repos directory at ~/.cocoa-pods. The
...
...
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