iOS 模块化 podspec 文件编写

iOS 模块化 podspec 文件编写,第1张

Pod::Spec.new do |s|

s.name          = "DJLogin"
s.version       = "0.0.1"
s.summary       = "DJLogin"

s.description   = <<-DESC
A longer description of DJLogin in Markdown format.

* Think: Why did you write this? What is the focus? What does it do?
* CocoaPods will be using this to generate tags, and improve search results.
* Try to keep it short, snappy and to the point.
* Finally, don't worry about the indent, CocoaPods strips it!
DESC

s.homepage      = "https://github.com/DJLogin"
s.author           = { 'summerxx' => 'summerxx@xxx.cn' }
s.platform      = :ios, "10.0"
s.source        = { :git => "https://github.com/DJLogin.git", :tag => "0.1.0" }

#s.source_files  = "Classes/**/*.{h,m,swift}"
#s.resource_bundle = {
#  'DJLogin' => ['Resources/*']
#}
s.prefix_header_contents =
'@import DJFoundationSwift;',
'@import DJUIKitSwift;',
'@import DJServices;',
'#import ',
'#import ',
'#import ',
'#import ',
'#import ',
'#import '


s.dependency 'DJFoundation'
s.dependency 'DJUIKit'
s.dependency 'DJServices'
s.dependency 'Mantle'
s.dependency 'Masonry'
s.dependency 'ReactiveObjC'
s.dependency 'DJResource'
s.dependency 'DJApi'
s.dependency 'Networking'
# 默认引用 LivePush
s.default_subspec = 'LivePush' 
# 公用代码
s.subspec 'Core' do |ss|
  ss.source_files  = "Core/**/*.{h,m,swift}"
end
#主 app 引用代码
s.subspec 'DongjiaApp' do |ss|
   ss.source_files  = "DongjiaApp/**/*.{h,m,swift}"
   ss.dependency 'DJLogin/Core'
   ss.dependency 'LBXScan'
   ss.dependency 'DJWebSocket'
   ss.dependency 'JVerification'
end
#推流 app 引用代码
s.subspec 'LivePush' do |ss|
  ss.source_files  = "LivePush/**/*.{h,m,swift}"
  ss.dependency 'DJLogin/Core'
  ss.resource_bundle = {
    'DJLogin' => ['LivePush/Resources/*']
  }
end

end

注意:
文件路径不能错
每个子模块的子文件单独引用依赖

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/993680.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-21
下一篇 2022-05-21

发表评论

登录后才能评论

评论列表(0条)

保存