-
升级版本
$sudo gem install cocoa pods pod setup
-
注册
pod trunk register 252289287@qq.com 'Aiden' --verbose
注册完成可以查看信息
pod trunk me
-
创建.spec文件
pod spec create DHCalendarView
-
打开DHCalendarView.podspec填写信息
Pod::Spec.new do |s| s.name = "DHCalendarView" s.version = "1.0.4" s.summary = "日历" s.description = <<-DESC 好用的日历 DESC s.homepage = "https://github.com/DajuanM/DHCalendarView" s.license = "MIT" s.author = { "Aiden" => "252289287@qq.com" } s.source = { :git => "https://github.com/DajuanM/DHCalendarView.git", :tag => "#{s.version}" } s.source_files = "DHCalendarView","DHCalendarView/**/*.{h,m}" s.requires_arc = true s.ios.deployment_target = '8.0' end
所有的符号必须�要是英文符号,不然会报错
这中间可能会报一些错误,根据提示解决就好了
-
忽略警告
pod lib lint --allow-warnings
-
验证文件是否编写正确
pod lib lint DHCalendarView.podspec
-
创建tag
git tag '1.0.4' git push --tags
-
把编写的文件告诉cocopods
pod trunk push DHCalendarView.podspec
出现以下信息就算成功了
错误:
![Uploading EA4DCC48-B246-47D5-ABB6-40FCEFC63707_378201.png . . .]
解决方法
pod trunk push DHCalendarView.podspec --allow-warnings
网友评论