Host in-house private frameworks with CocoaPods

February 17, 2018 - 1 minute read -
ios swift macos cocoaPods Xcode

When you have frameworks which you need to share between iOS developers inside a company without going public you can do it with a private CocoaPods repository. In this blog post, I’m going to show you how to do so step by step.

You should have a CocoaPods installed otherwise install it:

sudo gem install cocoapods
  • Create private repository on your company’s Github, Bitbucket or Gitlab: Bitbucket
  • Provide access for all your iOS team members.

  • Add your private specs:
pod repo add specsName https://code.company.com/podspecs.git

Note : It will be add to the pass ~/.cocoapods/repos

  • When you have your pod ready, push your CocoaPod specs to remote:
pod repo push specsName MyPod.podspec

OR

pod repo push --allow-warnings specsName MyPod.podspec
  • When you need to use your in-house pod, just add your private podspecs source and desire pod to Podfile
source 'https://code.company.com/podspecs.git'
source 'https://github.com/CocoaPods/Specs.git' 
platform :ios, '11.0'

target 'MayApp' do
  use_frameworks!
  pod 'MyPod'
end