Cocopods 公共仓库创建

先前工作的时候通过私有的 Git 搭建了 CocoaPods 仓库,然后用到的控件或者自定义仓库就直接使用,甚至将业务模块也做成了仓库,这样做的好处是集成的时候非常方便,但是大部分都做成了私有仓库,Git 地址都是私有地址,这样就会出现一个问题,就是这些私有仓库一但不在公司网络中便没有办法操作了,所以这次就一些非业务的控件直接做成公共的仓库,在这里坐下记录:

模板搭架工程框架

pod lib create 是 CocoaPods 提供的创建仓库模板的命令,可以通过设置 url 的方式通过模板来配置模板,也可以使用默认的(就是不适用url),然后通过选项来配置模板仓库。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
pod lib create MLRouterAction
Cloning `https://github.com/CocoaPods/pod-template.git` into `MLRouterAction`.
Configuring MLRouterAction template.

------------------------------

To get you started we need to ask a few questions, this should only take a minute.

If this is your first time we recommend running through with the guide:
- https://guides.cocoapods.org/making/using-pod-lib-create.html
( hold cmd and click links to open in a browser. )


What platform do you want to use?? [ iOS / macOS ]
> iOS

What language do you want to use?? [ Swift / ObjC ]
> ObjC

Would you like to include a demo application with your library? [ Yes / No ]
> Yes

Which testing frameworks will you use? [ Specta / Kiwi / None ]
> None

Would you like to do view based testing? [ Yes / No ]
> Yes

What is your class prefix?
> ML

Running pod install on your new library.

Analyzing dependencies
Fetching podspec for `MLRouterAction` from `../`
Downloading dependencies
Installing FBSnapshotTestCase (2.1.4)
-------------本文结束谢谢欣赏-------------
Alice wechat