Users' questions

What are private pods?

What are private pods?

CocoaPods is a great tool not only for adding open source code to your project, but also for sharing components across projects. You can use a private Spec Repo to do this.

How do I add files to Podspec?

All Pods have a podspec file….Creating a Podspec

  1. To create a Podspec, navigate to your project file in the Terminal.
  2. Run the following command to create the file: touch FantasticView. podspec .
  3. Now open the file using an editor.
  4. Paste the following code inside the Podspec:

How do you make a CocoaPod?

Here is a quick overview of all the steps to create a pod:

  1. Set up Xcode project and necessary targets.
  2. Link to Github.
  3. Implement the pod.
  4. Write unit tests.
  5. Configure Travis CI and Codecov.
  6. Publish the pod.

What is a pod repo?

The repo is basically a list of all pods and versions available. I have just encountered an error in our CI builds because the repo did not include a spec for a library I have just added. By running pod repo update it now knows of this newer version and can continue to install it.

Can you create a private spec Repo for CocoaPods?

You can use a private Spec Repo to do this. There are a few steps to getting a private pods setup for your project; creating a private repository for them, letting CocoaPods know where to find it and adding the podspecs to the repository. < 1. Create a Private Spec Repo

How to set up pods in a private Repo?

Add your Podspec to your repo. Make sure you’ve tagged and versioned your source appropriately, then run: $ pod repo push REPO_NAME SPEC_NAME.podspec. This will run pod spec lint, and take care of all the little details for setting up the spec in your private repo.

How to create and distribute private libraries with CocoaPods?

pod repo add [REPO_NAME] [SOURCE_URL] They also need to specify the source URL of the spec repo at the top of the pod file, so that cocoapods knows where to find the installation of your pod (as shown below). Congratulations! You have just published your first private Pod with your team.

How to create a pod project in CocoaPods?

CocoaPods provides a nice utility to help you setup your Pod project along with a test app and testing framework. So to generate your Pod project, just run the following command while standing at your empty github repo directory. where [POD_NAME] is the name of the pod you’re creating and want to share with fellow developers in your organization.