1.创建工程
2.创建podfile => install
3.创建podspec文件
4.main.同级目录下创建文件夹(src)里边放入提出来的代码
5编辑spec文件
Pod::Spec.new do |spec|
spec.name = "ModuleAZF"
spec.version = "0.0.1"
spec.summary = "描述"
spec.description = <<-DESC
详细描述
DESC
spec.homepage = "http://zfff.com"
spec.license = "MIT"
# spec.license = { :type => "MIT", :file => "FILE_LICENSE" }
spec.author = { "lxy" => "512000172@qq.com" }
spec.platform = :ios
spec.source = { :git => "https://github.com/ModuleAZF.git", :tag => "#{spec.version}" }
spec.source_files = "ModuleAZF/src/**/*.{h,m}"
spec.exclude_files = "ModuleAZF/Exclude"
spec.public_header_files = "ModuleAZF/src/**/*.h"
注意,source_files文件的路径
6 podfile 添加 pod 'ModuleAZF' , :path => './'
7执行pod install
如果在init过程中出错,,,可以查阅https://www.jianshu.com/p/64e30843ff28(钊de说说)
这样再打开工程,就会看到pod下的文件夹是Development Pods
我们创建成功的本地库