iOS and CocoaPods
Set up CocoaPods
Point your Podfile at the ForgeRepo™ CocoaPods CDN, and give pod your token in ~/.netrc.
Put the ForgeRepo™ CDN at the top of your Podfile, in place of the default one:
$ cat Podfile source 'https://packages.example.com/cocoapods/' platform :ios, '15.0' target 'App' do pod 'Alamofire', '~> 5.9' end $ cat ~/.netrc machine packages.example.com login your-user-name password <your token>
Captured by running these commands against a real ForgeRepo™.
- pod reads the login for packages.example.com from
~/.netrc. Make the file readable only by you withchmod 600 ~/.netrc. - With the source line in the Podfile, every pod comes through packages.example.com, and so does its code. pod never goes to GitHub for it.
Then install as usual:
$ pod install ... Adding spec repo `company-cocoapods` with CDN `https://packages.example.com/cocoapods/` Downloading dependencies Installing Alamofire (5.12.2) Generating Pods project Integrating client project [!] Please close any current Xcode sessions and use `App.xcworkspace` for this project from now on. Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
Captured by running these commands against a real ForgeRepo™.