制作私有库

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

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


501604809505_.pic_hd.jpg

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


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

  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。

私有库创建完成。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。