pod spec 文件如下
#
# Be sure to run `pod lib lint commonComponent.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 = 'commonComponent'
s.version = '0.0.2'
s.summary = 'A short description of commonComponent.'
# 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/anxiong/commonComponent'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { .. => '.....' }
s.source = { :git => '....git', :tag => '0.0.2' }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.ios.deployment_target = '10.0'
s.subspec 'praiseButton' do |praiseButton|
praiseButton.source_files = 'commonComponent/Classes/praiseButton/**/*'
praiseButton.public_header_files = 'commonComponent/Classes/praiseButton/**/*.h'
praiseButton.dependency 'PaperComponent', '~> 0.0.8'
end
s.subspec 'attentionButton' do |attentionButton|
attentionButton.source_files = 'commonComponent/Classes/attentionButton/**/*'
attentionButton.public_header_files = 'commonComponent/Classes/attentionButton/**/*.h'
attentionButton.dependency 'PaperComponent', '~> 0.0.8'
end
s.subspec 'videoPhotoPick' do |videoPhotoPick|
videoPhotoPick.source_files = 'commonComponent/Classes/videoPhotoPick/**/*'
videoPhotoPick.public_header_files = 'commonComponent/Classes/videoPhotoPick/**/*.h'
videoPhotoPick.dependency 'PaperComponent', '~> 0.0.8'
videoPhotoPick.dependency 'Masonry'
end
# s.resource_bundles = {
# 'commonComponent' => ['commonComponent/Assets/*.png']
# }
# s.public_header_files = 'Pod/Classes/**/*.h'
# s.frameworks = 'UIKit', 'MapKit'
# s.dependency 'AFNetworking', '~> 2.3'
end
给pod 库添加文件夹如图
pod 描述文件说明