Git 本地私有仓库

1 篇文章 0 订阅

到本地目录下:

bogon:component mr.zhang$ cd YSTHome/

 

 创建本地spec:

bogon:YSTHome mr.zhang$ pod lib create YSTHome

回答问题:

To get you started we need to ask a few questions, this should only take a minute.

If this is your first time we recommend running through with the guide: 
 - https://guides.cocoapods.org/making/using-pod-lib-create.html
 ( hold cmd and double click links to open in a browser. )


What platform do you want to use?? [ iOS / macOS ]
 > ios

What language do you want to use?? [ Swift / ObjC ]
 > objc

Would you like to include a demo application with your library? [ Yes / No ]
 > yes

Which testing frameworks will you use? [ Specta / Kiwi / None ]
 > none

Would you like to do view based testing? [ Yes / No ]
 > yes

What is your class prefix?
 > YST

成功标志:

Analyzing dependencies
Fetching podspec for `YSTHome` from `../`
Downloading dependencies
Installing FBSnapshotTestCase (2.1.4)
Installing YSTHome (0.1.0)
Generating Pods project
Integrating client project

[!] Please close any current Xcode sessions and use `YSTHome.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 2 total pods installed.

 

开始编辑spec文件: (ps: 这个是初始什么都木有改过的 s.source  Git地址如果是生成本地的不需要填写,如果需要传到Git则否)


Pod::Spec.new do |s|
  s.name             = 'YSTHome'
  s.version          = '0.1.0'
  s.summary          = 'A short description of YSTHome.'

  s.description      = <<-DESC
TODO: Add long description of the pod here.
                       DESC

  s.homepage         = 'https://github.com/张xx/YSTHome'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { '张xx' => 'zhangxx@xxx.com' }
  s.source           = { :git => '', :tag => s.version.to_s }

  s.ios.deployment_target = '8.0'

  s.source_files = 'YSTHome/Classes/**/*'

这个是修改过路径的:  (这里需要说一哈 生成的项目中有放置图片的地址的,但是我没那么做,个人习惯用buddle^_^)

  s.source       = { :git => "", :tag => "0.0.1" }

  s.source_files  = "YSTHome", "YSTHome/**/*.{h,m}"
  s.exclude_files = "YSTHome/Exclude"

  s.public_header_files = "YSTHome/**/*.h"
  s.resource  = "YSTHome/**/*.{bundle,json}"
  s.vendored_frameworks  = "YSTHome/**/*.{framework,a}"

然后就是把开始撸码~

 

开始验证:

bogon:~ mr.zhang$ cd /Users/mr.zhang/Desktop/8.0keper/component/YSTHome/YSTHome 

bogon:YSTHome mr.zhang$ pod lib lint YSTHome.podspec --allow-warnings
 -> YSTHome (0.1.0)
    - WARN  | summary: The summary is not meaningful.
    - WARN  | url: There was a problem validating the URL https://github.com/张xx/YSTHome.


YSTHome passed validation.

主工程导入:

    pod 'YSTHome', :path => './component/YSTHome/'

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值