制作私有库

创建私有库
pod lib create testPod
依次根据提示输入iOS、Objc、Yes、None、Yes、THS(这个是项目的前缀)
制作私有库_第1张图片
491604809104_.pic.jpg

上面的是我刚创建的,执行完如上命令后会生成一个相应的私有库壳工程,对应组件在Development Pods环境下开发、调试,保证在现有工程中能运行成功;
在github中创建相应私有库的工程,如创建THSTestPod:


制作私有库_第2张图片
501604809505_.pic_hd.jpg

将本地私有库和远端的仓库关联上


制作私有库_第3张图片
511604809681_.pic.jpg
#
# Be sure to run `pod lib lint testPod.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|
  s.name             = 'testPod'
  s.version          = '0.1.0'
  s.summary          = 'A short description of testPod.'

# 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/[email protected]/testPod'
  # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { '[email protected]' => '[email protected]' }
  s.source           = { :git => 'https://github.com/[email protected]/testPod.git', :tag => s.version.to_s }
  # s.social_media_url = 'https://twitter.com/'

  s.ios.deployment_target = '8.0'

  s.source_files = 'testPod/Classes/**/*'
  
  # s.resource_bundles = {
  #   'testPod' => ['testPod/Assets/*.png']
  # }

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

修改s.homepage、 s.source,分别与gitlab 中的Clone with SSH、Clone with HTTP。

私有库创建完成。

你可能感兴趣的:(制作私有库)