今天要寫podspec
點開podspec
Pod::Spec.new do |s|
s.name = 'PodLibDemo'
s.version = '0.1.0'
s.summary = 'A short description of PodLibDemo.'
# 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/fox3allenwang/PodLibDemo'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'fox3allenwang' => 'fox3allenwang@gmail.com' }
s.source = { :git => 'https://github.com/fox3allenwang/PodLibDemo.git', :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.ios.deployment_target = '10.0'
s.source_files = 'PodLibDemo/Classes/**/*'
# s.resource_bundles = {
# 'PodLibDemo' => ['PodLibDemo/Assets/*.png']
# }
# s.public_header_files = 'Pod/Classes/**/*.h'
# s.frameworks = 'UIKit', 'MapKit'
# s.dependency 'AFNetworking', '~> 2.3'
end
name -> 你的套件名稱
vrsion -> 版本,以後更新後都要記得改這裡
summary -> 間單說明套件
description -> 詳細說明套件
homepage -> 主頁
license -> 協定
author -> 作者
ios.deployment_target -> 套件最低支援的 iOS 版本
source_files -> 套件的 Source Code 路徑
resource_bundles -> 套件裡面的圖片、Color Set 等資源
frameworks -> 套件裡面有用到的官方Framework
dependency -> 套件有用到第三方的套件
參考:https://www.jianshu.com/p/a23397065e40
podspec
name:框架名
version:当前版本(注意,是当前版本,假如你后续更新了新版本,需要修改此处)
summary:简要描述,在pod search ZCPKit的时候会显示该信息。
description:详细描述
homepage:页面链接
license:开源协议
author:作者
source:源码git地址
platform:支持最低ios版本
source_files:源文件(可以包含.h和.m)
public_header_files:头文件(.h文件)
resources:资源文件(配置的文件都会被放到mainBundle中)
resource_bundles:资源文件(配置的文件会放到你自己指定的bundle中)
frameworks:依赖的系统框架
vendored_frameworks:依赖的非系统框架
libraries:依赖的系统库
vendored_libraries:依赖的非系统的静态库
dependency:依赖的三方库