美文网首页
Pod私有库制作

Pod私有库制作

作者: BLUEVIPIOS_ | 来源:发表于2021-01-07 17:18 被阅读0次
  1. cd 到你要存放的文件夹下面 执行
pod lib create +项目名

2.创建podspec、LICENSE等文件

Press return to continue.


What platform do you want to use?? [ iOS / macOS ]
 > iOS
# 选择编程语言
What language do you want to use?? [ Swift / ObjC ]
 > ObjC
# 在你的项目中是否创建一个demo工程
Would you like to include a demo application with your library? [ Yes / No ]
 > No
# 测试框架选择哪一个
Which testing frameworks will you use? [ Specta / Kiwi / None ]
 > None
# 要不要做视图测试
Would you like to do view based testing? [ Yes / No ]
 > Yes
 Putting demo application back in, you cannot do view tests without a host application.
# 类前缀名
What is your class prefix?
 > YJ


这时pod库已生成

  1. YJUIKIt.podspec 说明
#
# Be sure to run `pod lib lint YJUIKIt.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
#跟podspec文件名相同
  s.name             = 'YJUIKIt'
#版本
  s.version          = '0.1.0'
#库的简介
  s.summary          = 'A short description of YJUIKIt.'

# This description is used to generate tags and improve search results.
#   * Think: What does it do? Why did you write it? What is the focus?
#   * Try to keep it short, snappy and to the point.
#   * Write the description between the DESC delimiters below.
#   * Finally, don't worry about the indent, CocoaPods strips it!

  s.description      = <<-DESC
TODO: Add long description of the pod here.
                       DESC
#项目主页地址
  s.homepage         = 'https://github.com/xxxx/YJUIKIt'
  # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
#MIT是一个比较宽泛的开源许可协议
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { 'xxxx' => 'xxxx@qq.com' }
#代码仓库的地址
  s.source           = { :git => 'https://github.com/xxxx/YJUIKIt.git', :tag => s.version.to_s }
  # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

  s.ios.deployment_target = '9.0'
#规范支持的CocoaPods版本
  s.cocoapods_version = '>= 0.36'
#pod库的源文件
  s.source_files = 'YJUIKIt/Classes/**/*'
  
  # s.resource_bundles = {
  #   'YJUIKIt' => ['YJUIKIt/Assets/*.png']
  # }

  # s.public_header_files = 'Pod/Classes/**/*.h'
  # s.frameworks = 'UIKit', 'MapKit'
  # s.dependency 'AFNetworking', '~> 2.3'
end

介绍的只是本地的pod库 并不关联远程仓库 若要管理 也很简单 这里就不记录了。

相关文章

  • 制作Pod库

    目录 一、公有Pod库制作 二、私有Pod库制作 三、subspec子库的制作 四、遇到的坑 一、公有Pod库制作...

  • iOS:CocoaPods制作私有库

    本章制作私有库方法省去了繁琐的Pod校验,快速简单制作私有库。 创建索引库 我使用的是GitHub 制作Pod 再...

  • 制作 CocoaPods 开源库

    CocoaPods 开源库的制作过程: 添加私有Pod仓库,用来存储私有Pod库的podspec文件,类似Coco...

  • pod search 提示Unable to find a po

    制作cocoapods私有库时,输入pod search Person (Person为自己私有库)发现提示"[!...

  • 制作自己的Cocoapods

    制作自己的Cocoapods 创建自己私有pod库,官方推荐使用 pod lib create [pod name...

  • Pod私有库制作

    ##Pod私有库制作 ####目录 +安装CocoaPods +创建远程内部私有Spec Repo仓库 +模板创建...

  • pod 私有库的制作

    声明: 该文章描述,将制作好的 framework ,打包成pod 私有库 创建私有库模板 根据创建的提示,选择库...

  • 制作私有库引用Framework

    记:制作私有库时,遇到了一些问题,在此进行记录,避免再次踩坑。 感谢《关于制作私有pod库包含framework和...

  • Pod私有库制作

    cd 到你要存放的文件夹下面 执行 2.创建podspec、LICENSE等文件 Press return to ...

  • 创建SDK库(framework)并可以使用cocoapods引

    一:pod库的新建 1.创建pod私有库. cd 私有库存放目标路径 pod lib create xxx(私有库...

网友评论

      本文标题:Pod私有库制作

      本文链接:https://www.haomeiwen.com/subject/gvmzoktx.html