Skip to content

Instantly share code, notes, and snippets.

@radiospiel
Created March 9, 2012 22:41
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save radiospiel/2009100 to your computer and use it in GitHub Desktop.
Save radiospiel/2009100 to your computer and use it in GitHub Desktop.
How I use Cocoapod locally
  1. Preparation

Setup a local CocoaPods directory, and register it with CocoaPods

mkdir -p ~/CocoaPods/Local
(cd ~/CocoaPods/Local; git init)
pod repo add ~/CocoaPods/Local
  1. Update local CocoaPod

    Whenever you have a local version you want to use in some other project, use the update-localpod script to update the local CocoaPod. It runs through all podspec files, and installed a version which points to the local repository instead of the remote.

    See this script: https://gist.github.com/2009088

  2. Update references in target project.

    rm -rf Pods/ pod install

@mattyohe
Copy link

mattyohe commented Mar 4, 2013

I just randomly found this.... And thought I should comment...

You can point to local pods by setting up your Podfile like this:

pod 'MyPod', :local => "/Path/To/Pod"

Wait... Now that I look at it.. You requested this feature and it was added :D
CocoaPods/CocoaPods#156

@hlung
Copy link

hlung commented Feb 2, 2014

I think the local option is deprecated :/ I just tried this...
pod 'NewPod', :local => "../"

and it gives me this warning...
[!] The :local option of the Podfile has been renamed to :path and is deprecated.

Cocoapods 0.29.0

@bluealert
Copy link

pod --version
0.34.2

pod 'UpYunSDK', :path => '/Users/xxx/iOS/ios-form-sdk'

very ok. 😄

https://github.com/upyun/ios-form-sdk

@kumarkalluri
Copy link

i am trying to execute pod in offline, for that i downloaded spec-master and followed your mentioned procedure like
pod repo add master ~/.cocoapods/Spec-master

Getting below error

To setup the master specs repo, please run pod setup

@philosopherdog
Copy link

@bluealert Your solution worked in the latest cocoapods and xcode. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment