http://www.tuicool.com/articles/ErMZNn
iOS笔记(31) CocoaPods 手把手五分钟教你制作自己的podspec文件
pod
spec
create https://github.com/iiiyu/XCAsyncTestCase
git tag -a 0.0.1 -m "Tag release 0.0.1” git push —tags rm -rf XCAsyncTestCase.podspec pod spec create https://github.com/iiiyu/XCAsyncTestCase
git add XCAsyncTestCase.podspec
git commit -am "add XCAsyncTestCase.podspec file”
git push
两个关键的文件:.spec文件
Pod::Spec.new do |s| s.name = "VeriJSON" s.version = "0.1.1" s.summary = "An Objective-C library for verifying JSON against a pattern-based schema." s.homepage = "https://bitbucket.org/dcutting/verijson" s.license = "MIT" s.author = { "Dan Cutting" => "[email protected]" } s.source = { :hg => "https://bitbucket.org/dcutting/verijson", :revision => "0.1.1" } s.ios.deployment_target = "5.0" s.osx.deployment_target = "10.7" s.source_files = "VeriJSON/VeriJSON" s.requires_arc = true end .gitignore文件
# Mac OS X
._*
*.DS_Store
*.psd
# Xcode
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
*.xcuserstate
project.xcworkspace/
xcuserdata/
DerivedData/
# Generated files
build/
*.[oa]
*.pyc
# Backup files
*~.nib
/ graphics/