制作cocoapods的大致流程:
- 在github上新建一个项目库, 例如我创建了"SJLogDictionary" 项目.

- 在项目中新建自制库所在文件夹, 例如"SJLog".

-
在项目根目录下执行pods命令
pod spec create SJLogDictionary
创建SJLogDictionary.podspec
文件
podspec.png
-
在项目根目录下执行pods命令
pod lib lint
, 可能会出现错误和警告
4.1 错误: 1. xcrun simctl install booted /path/xxx.app
解决方法: sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
警告: [!] SJLogDictionary did not pass validation, due to 1 warning (but you can use `--allow-warnings` to ignore it). You can use the `--no-clean` option to inspect any issue.
解决方法: 加--allow-warnings
网友评论