Cocoa Pods Website: https://cocoapods.org/ 1, create pod run pod lib create xxx, in the run current directory created project named XXX, this process will be required to fill in the supported language OC or Swift, whether to create a demo, select a test framework, and so on. Modify the. podspec file after successful creation, it is important to note that ' and ' cannot be a Chinese symbol otherwise the following steps do a packet syntax error pod::spec.new do |s| s.name = "yxhttpsession" s.version = "0.1 .1 " s.summary =" A Simple network base on nsurlsession. " s.homepage = "Https://github.com/shuleihen/YXHTTPSession" s.license = ' MIT ' s.author = {"Zdy" + = "[email protected]"} s.source = {: git = "Https://github.com/shul Eihen/yxhttpsession.git ",: Tag = s.version.to_s} s.ios.deployment_target = ' 7.0 ' s.source_files = ' yxhttpsession/classes/**/* ' s.dependency ' MjextensIon ', ' ~> 3.0.10 ' end pod Spec Lint detects if there is a problem with the file and detects external dependencies, pod Lib Lint detects only the file for problems. This provides the pod creation process https://guides.cocoapods.org/making/using-pod-lib-create Add the source to the Project Class folder, Tag for 0.1.1 to submit on GitHub. How to use Git to see git usage instructions.  2, create a private source Specs repo Create an empty source address on Git [email protected]:shuleihen/specs.git add a private source address
$ pod repo add REPO_NAME SOURCE_URLUnder the ~/.cocoapods/repos/directory, you can find a private source to add pods to a private source
$ pod repo push REPO_NAME SPEC_NAME.podspec
Define a private Cocoapods source