一,首先创建一个framework,命名为testLib:

二,创建demo,开发过程中做演示使用,命名为test-Demo:

三,建立一个workspace工作空间来管理项目,命名与组件库保持一致叫testLib.xcworkspace:

四,打开workspace文件,添加刚创建好到两个工程。

此时目录结构如下:

五,接下来创建podspec文件,cd到工程目录在终端下执行
pod spec create testLib
此时pedspec文件自动创建好了:

大致podspec配置如下:

六,下一步pod init
创建Podfile文件,之后执行pod install
创建pod文件:

至此,工程创建完成,可以准备开发了。
网友评论