1.首先检查一下自己pod的版本,在终端上输入:
pod --version
2.查看版本号,看是否需要更新,如果要更新,执行:
sudo gem install cocoapods
3.到自己的github创建一个新的仓库,用来保存我们要上传的代码。
1为仓库名称,用来在github中显示。
2是初始化readme文件,建议勾选
3是选择许可证,常用的有Apache License2.0、GNU General Public Licensev3.0和MIT License,博主一般使用第三个MIT License,注意许可证是必选项!是必选项!是必选项!
还有个add .gitignore可选择Objective-C。点击Create repository创建完成。
4.sourcetree 拉下来 代码上传 打标签
5.pod spec create ADAlertController-swift
spec.name = "ADAlertController-swift"
spec.version = "1.0.1"
spec.summary = "A short description of ADAlertController-swift."
spec.description = <<-DESC
一个alert的cocoapods项目
DESC
spec.homepage = "https://github.com/yourks/ADAlertController-swift"
spec.license = "MIT"
spec.author = { "apple" => "[email protected]" }
spec.platform = :ios, "9.0"
spec.source = { :git => "https://github.com/yourks/ADAlertController-swift", :tag => "1.0.1" }
spec.source_files = "ADAlertControllerKit/**/*.{h,m,swift}"
spec.frameworks = "UIKit", "Foundation"
spec.requires_arc = true
spec.dependency "SnapKit"
注册trunk账号:
6.pod trunk register 邮箱 昵称 --description="描述"
验证
7.pod trunk me
检验一下spec文件是否合格:
8.pod spec lint ADAlertController-swift.podspec
忽略警告
9.pod lib lint --allow-warnings
最后上传
10.pod trunk push --allow-warnings
11. pod search ADAlertController-swift --allow-warnings
ERROR | [iOS] unknown: Encountered an unknown error (/usr/bin/xcrun simctl list -j devices
https://www.jianshu.com/p/a35b0b0db6c6?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation
IOS CocoaPods Unable to find a specification for xxxx
问题解决
https://blog.csdn.net/sky_long_fly/article/details/88052149
资料
https://blog.csdn.net/keleyundou/article/details/49635589
https://www.jianshu.com/p/283584683b0b
https://www.jianshu.com/p/a20cd23c80a8
邀请团队成员加入项目git
(https://www.cnblogs.com/lyc-code/p/12950562.html)
https://www.cnblogs.com/lyc-code/p/12950562.html
Cocoapods开发组件 更新迭代库
重复着2步
9.pod lib lint --allow-warnings
10.pod trunk push --allow-warnings
http://www.cocoachina.com/articles/17932
.podspec` specification does not validate.
https://www.jianshu.com/p/a66e8123d508
swiftLint,
https://lookin.work
自己总结了半天看了下别人的!嗯!更好 !
https://www.jianshu.com/p/33370e054bf9