项目上传CocoaPods

操作基本步骤:

一:将代码提交到GitHub上

二:设置Tag(git tag ‘1.0.0’ )

三:更新CocoaPods版本

四:注册Trunk账号(如果已注册,则跳过此步骤),建议注册时用户名和邮箱与GitHub用户名邮箱相同

五:新建.podspec文件,编写完成后并进行提交验证(pod spec lint Name.podspec),验证通过后提交.podspec文件到trunk中

六:上传成功后可以使用pod search 进行搜索验证(上传成功后有审核时间)

详细说明:

一:将代码上传到GitHub上详细参考地址:https://www.jianshu.com/p/55f7715518a2

二:设置Tag

   1.git tag "v1.0.0"  如果第一次上传设置Tag时必须写**“v”**

   2.git push --tags 

三:更新CocoaPods

四:注册,如果有张账号可以通过:pod trunk me查看

[图片上传中...(image-98e1ef-1516353588257-0)]

五:创建文件,此步骤最重要

  1.创建podspec文件:pod spec create xx

   2.编写podspec文件:
Pod::Spec.new do |s|
  s.name         = "LYButton"
  s.version      = "1.0.0"
  s.summary      = "LYButton+Extension"
  s.homepage     = "https://github.com/luyun/LYButton"
  s.license      = "MIT"
  s.author       = { "luyun" => "https://github.com/luyun/LYButton" }
  s.requires_arc = true
  s.source       = { :git => "https://github.com/luyun/LYButton.git", :tag => s.version.to_s }
  s.platform     = :ios, "7.0"
  s.source_files = "LYButton/**/*.{h,m}"
end

编写成功后,可以通过pod lib lint验证文件:

image

验证通过后就可以开始上传:pod trunk push LYButton.podspec

image
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。