1. 创建本地私有库
-
创建需要做成组件的库
1.png
-
使用
git管理git initgit add .git commit -m"xx"
由于是创建本地私有库,所以不需要推送到远程服务器
-
创建
spec文件pod spec create <spec文件名>-
spec文件名必须和组件名一致,例如:pod spec create testLib
-
修改
spec文件信息- 修改
s.summary,s.description,s.license,s.source等字段
2.png
3.png
本地私有库,最主要的是把
source中的路径置成空 - 修改
-
至此,本地私有库制作完成
4.png
2. 验证本地私有库
-
创建测试工程, 并使用
cocoapods管理pod init-
配置
Podfile文件
6.png
关键配置此本地库的路径
pod install- 编译即可












网友评论