iOS 模块化 podspec 文件编写
Posted 夏天然后
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了iOS 模块化 podspec 文件编写相关的知识,希望对你有一定的参考价值。
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 <DJFoundation/DJFoundation.h>',
'#import <Mantle/Mantle.h>',
'#import <Masonry/Masonry.h>',
'#import <ReactiveObjC/ReactiveObjC.h>',
'#import <DJUIKit/DJUIKit.h>',
'#import <DJResource/DJResource.h>'
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
注意:
文件路径不能错
每个子模块的子文件单独引用依赖
以上是关于iOS 模块化 podspec 文件编写的主要内容,如果未能解决你的问题,请参考以下文章