#
# Be sure to run `pod lib lint CPYPrivatePodsDemo.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 http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = 'CPYPrivatePodsDemo'
s.version = '0.1.0'
s.summary = 'A private pod test demo'
# 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://coding.net/u/cielpy/p/CPYPrivatePodsDemo'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Cielpy' => 'beijiu572@gmail.com' }
s.source = { :git => 'https://git.coding.net/cielpy/CPYPrivatePodsDemo.git', :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.ios.deployment_target = '8.0'
s.source_files = 'CPYPrivatePodsDemo/Classes/**/*'
# s.resource_bundles = {
# 'CPYPrivatePodsDemo' => ['CPYPrivatePodsDemo/Assets/*.png']
# }
# s.public_header_files = 'Pod/Classes/**/*.h'
# s.frameworks = 'UIKit', 'MapKit'
# s.dependency 'AFNetworking', '~> 2.3'
end
本地测试 podspec 文件是否可用
用 pod 提供的工具检查 podspec 文件是否合法,命令如下:
1
pod lib lint CPYPrivatePodsDemo.podspec
如果结果显示如下,说明是合法的
然后我们在另建一个工程,运行 pod init 初始化 Podfile,加入 pod 并指定 podspec 路径,这里指定本地的 podspec 文件的路径。
1
2
3
4
5
use_frameworks!
target 'PodTest' do
pod 'CPYPrivatePodsDemo', :podspec => '/Users/xx/Downloads/CPYPrivatePodsDemo/CPYPrivatePodsDemo.podspec'
end