Rx需要导入的库
2018-03-03 本文已影响14人
春暖花已开
platform :ios, '11.0'
use_frameworks!
target 'ProjectName' do
pod 'RxSwift','~> 4.0'
pod 'RxCocoa','~> 4.0' #把UI库和rx结合
pod 'FMDB', '~>2.6.2' #sqlite数据库
pod 'SwiftyJSON' #json处理
pod 'Moya/RxSwift' #网络请求
pod 'ObjectMapper', '~> 3.1' #Json转模型
pod 'MJRefresh', :inhibit_warnings => true #下拉刷新
pod 'RxDataSources', '~> 3.0' #帮助我们优雅的使用tableView的数据源方法
pod 'NSObject+Rx' #为我们提供 rx_disposeBag
pod 'Then' #提供快速初始化的语法糖
pod 'Reusable' #帮助我们优雅的使用自定义cell和view,不再出现Optional
end
#rx的debug使用
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'RxSwift'
target.build_configurations.each do |config|
if config.name == 'Debug'
config.build_settings['OTHER_SWIFT_FLAGS'] ||= ['-D', 'TRACE_RESOURCES']
end
end
end
end
end