Open Repo
Pull Your Repo to Local
cd </your/path/<myrepo> or create it with cd </your/path>. mkdir <myrepo>. cd <myrepo>git initgit remote add origin https://github.com/<username>/<myrepo>.git. (You can check if its working with git remote -v (Not git remove -v))git pullAdd Cocoapods
sudo gem install cocoapods. Write pod --help to check if it's working. (Skip if you already have cocoapods)<myrepo>.podspec with touch <myrepo>.podspec<myrepo>.podspec with an editor. Use Xcode or Sublime Text.Pod::Spec.new do |s|
s.name = "<myrepo>"
s.version = "0.1"
s.summary = "<My summary>"
s.description = "<MUST BE LONGER THAN SUMMARY>"
s.homepage = "https://github.com/<username>/<myrepo>"
s.license = 'MIT'
s.author = { "<username>" => "<useremail>" }
s.source = { :git => "https://github.com/<username>/<myrepo>.git", :tag => s.version.to_s }
s.platform = :ios, '8.0'
s.requires_arc = true
# If more than one source file: https://guides.cocoapods.org/syntax/podspec.html#source_files
s.source_files = '<myrepo>.swift'
end
pod lib lint <myrepo>.podspec to the terminal. If you have any errors write pod lib lint <myrepo>.podspec --verbose. Solve your errors (solving your errors could take some time can't help here).git add . then commit with git commit -m "Added pods"git pushs.version inside <myrepo>.podspecpod trunk register [email protected] 'Your Name' --description='macbook pro'pod trunk push <myrepo>.podspec. This will change the CocoaPods Specs which will enable you to write pod '<myrepo>' inside your podfile