利用pod trunk發(fā)布程序
注冊
pod trunk register 郵箱 '用戶名' --description='電腦描述'
查收郵件
接下來查看個人信息
- Name: MJ Lee
- Email: xxxxxx@qq.com
- Since: January 28th, 03:53
- Pods: None
- Sessions:
- January 28th, 04:28 - June 5th, 04:34. IP: xxx.xxx.xxx.xxx Description: Macbook Pro
NoMethodError - undefined method 'last' for #<Netrc::Entry:0x007fc59c246378>
- 這時候需要嘗試更新gem源或者pod
sudo gem update --system
sudo gem install cocoapods
sudo gem install cocospods-trunk
創(chuàng)建podspec文件
- 接下來需要在項目根路徑創(chuàng)建一個podspec文件來描述你的項目信息
pod spec create 文件名
- 比如pod spec create MJExtension就會生成一個MJExtension.podspec
填寫podspec內(nèi)容
Pod::Spec.new do |s|
s.name = "MJExtension"
s.version = "0.0.1"
s.summary = "The fastest and most convenient conversion between JSON and model"
s.homepage = "https://github.com/CoderMJLee/MJExtension"
s.license = "MIT"
s.author = { "MJLee" => "xxxxx@qq.com" }
s.social_media_url = "http://weibo.com/exceptions"
s.source = { :git => "https://github.com/CoderMJLee/MJExtension.git", :tag => s.version }
s.source_files = "MJExtensionExample/MJExtensionExample/MJExtension"
s.requires_arc = true
end
- 值得注意的是,現(xiàn)在的podspec必須有tag破托,所以最好先打個tag颊乘,傳到github
git tag 0.0.1
git push --tags
檢測podspec語法
pod spec lint MJExtension.podspec
發(fā)布podspec
檢測
-
pod setup
: 初始化
-
pod repo update
: 更新倉庫
pod search MJExtension
倉庫更新
- 如果倉庫更新慢腊脱,可以考慮更換倉庫鏡像
pod repo remove master
pod repo add master http://git.oschina.net/akuandev/Specs.git
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者