-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create development-cocoapods.html.md
- Loading branch information
1 parent
68361c3
commit 74e13a5
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,38 @@ | ||
--- | ||
title: Development Pods | ||
description: How to reference a local checkout of a Pod's repository while working on modifications to it. | ||
order: 4 | ||
|
||
--- | ||
|
||
If you yourself are the author of a Pod and you develop it in concert with an app, you | ||
often find yourself wanting to make changes to the Pod while it is installed into the app, | ||
to be able to try out your changes right there. | ||
|
||
Since CocoaPods assumes it has sole control of the Pods it checks out, you should not | ||
change the CocoaPod directly, as that would mean that CocoaPods might discard your | ||
changes and you could lose your changes on a thoughtless `pod update`. | ||
|
||
Instead, install your pod as a development pod. | ||
|
||
Where you usually refer to your (non-development) Pod as | ||
|
||
pod 'AwesomeView', '~> 1.42.0' | ||
|
||
you now instead specify it in your Podfile as | ||
|
||
pod 'AwesomeView', :path => '/Users/yourusername/path/to/pod/repo/AwesomeView' | ||
|
||
So it references your local checkout of your pod's repository. Then go into your _project_ | ||
directory and update only that Pod: | ||
|
||
```shell | ||
$ cd /path/to/project/folder | ||
$ pod update AwesomeView | ||
``` | ||
|
||
Now you should see a `Development Pods` group in your `Pods` project, containing a group | ||
showing all your Pod's source files, for you to conveniently edit. These are the files | ||
where you checked them out (not write-protected copies like usual checkouts of Pods), so | ||
you can safely edit them and push your changes to your repository just as you normally | ||
would without CocoaPods. |