需要引入本地私有库DataStoreTool
新建一个主工程后在主工程目录下建立一个私有库models,里面存放一个私有库DataStoreTool
在DataStoreTool目录下存放一个目录Classes,因为后面的建立spec文件目录中存在这样的文件夹字眼,
git init 初始化git
git add . 添加到暂缓区
git commit -m 'first commit'
建立spec描述文件
git spec create DataStoreTool
打开编辑DataStoreTool.podspec文件内容
需要更改
spec.summary = "DataStoreTool."
spec.description = "DataStoreTool.DataStoreTool.DataStoreTool."spec.description 比spec.summary长点
spec.license = "MIT"
spec.source = { :git => "", :tag => "#{spec.version}" }
spec.source_files = "Classes", "DataStoreTool/Classes/**/*.{h,m}"
spec.exclude_files = "Classes/Exclude"
新建Podfile文件
pod init
编辑Podfile
pod 'DataStoreTool', :path=>'models/DataStoreTool'
这就表明是导入本地私有库路径
最后
pod install
生成xcworkspace文件 打开文件就可以看到本地库