组件化之私有库创建一

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

我们创建成功的本地库

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值