CocoaPods发布自己项目Pods

//该命令将在当前目录产生一个名为xxx.podspec文件

pod spec create xxx

完善xxx.podspec文件信息(文末附上Masonry的文件内容,提供参考)

//验证执行命令

pod spec lint xxx.podspec

//注册Trunk

pod trunk register [email protected] ‘SamLiu’ --description='macbook air'

//验证

pod trunk me

//Trunk push

pod trunk push xxx.podspec

//更新pod库

pod setup

//删除pod发布

pod trunk delete podname version

pod trunk deprecate podname

Masonry.podspec

Pod::Spec.new do |s|

s.name    = 'Masonry'

s.version  = '1.0.2'

s.license  = 'MIT'

s.summary  = 'Harness the power of Auto Layout NSLayoutConstraints with a simplified, chainable and expressive syntax.'

s.homepage = 'https://github.com/cloudkite/Masonry'

s.author  = { 'Jonas Budelmann' => '[email protected]' }

s.social_media_url = "http://twitter.com/cloudkite"

s.source  = { :git => 'https://github.com/cloudkite/Masonry.git', :tag => "v#{s.version}" }

s.description = %{

Masonry is a light-weight layout framework which wraps AutoLayout with a nicer syntax.

Masonry has its own layout DSL which provides a chainable way of describing your

NSLayoutConstraints which results in layout code which is more concise and readable.

Masonry supports iOS and Mac OSX.

}

pch_AF = <<-EOS

#ifndef TARGET_OS_IOS

#define TARGET_OS_IOS TARGET_OS_IPHONE

#endif

#ifndef TARGET_OS_TV

#define TARGET_OS_TV 0

#endif

EOS

s.source_files = 'Masonry/*.{h,m}'

s.ios.frameworks = 'Foundation', 'UIKit'

s.tvos.frameworks = 'Foundation', 'UIKit'

s.osx.frameworks = 'Foundation', 'AppKit'

s.ios.deployment_target = '6.0' # minimum SDK with autolayout

s.osx.deployment_target = '10.7' # minimum SDK with autolayout

s.tvos.deployment_target = '9.0' # minimum SDK with autolayout

s.requires_arc = true

end

你可能感兴趣的:(CocoaPods发布自己项目Pods)