iOS 把自己的库上传到cocoapods步骤,podspec配置。

最重要的是填好“podspec”文件中的配置。

准备:

在github上建一个仓库,协议选择MIT。

提供demo的podspec配置,参数可能不全,可以自行添加。

Pod::Spec.new do |s|

  s.name         = "WPText"
  s.version      = "0.0.1"
  s.summary      = "WPText"
  s.description  = <<-DESC
  WPText
                   DESC
  s.homepage     = "https://github.com/weipeng02/WPText.git"
  s.license      = "MIT"                #开源协议
  s.source       = { :git => "https://github.com/weipeng02/WPText.git" }
  # s.screenshots  = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"
  s.module_name = 'WPText'                #模块名称
  s.license      = "MIT"
  s.author             = { "weipeng" => "weipeng@163.com" }
  s.platform   =  :ios,"8.0"
  s.source       = { :git => "https://github.com/weipeng02/WPText.git", :tag => "#{s.version}" }
  s.source_files  =  "WPText/*.{h,m}"
  s.requires_arc = true
  s.exclude_files = "WPText/Exclude"
  s.frameworks = "CoreLocation","Foundation", "CoreGraphics", "UIKit"
  # s.public_header_files = "WPButton/**/*.h"
end

 

以下是测试步骤,都有注释。

 

 

 

到这一步基本成功了,已经上传到公开的pod库。但是需要更新本地的pod信息,自己才能搜到上传的库。

 

 

 

 

转载于:https://www.cnblogs.com/weipeng168/p/9598190.html

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值