Swift常用第三方库
2023-08-21 本文已影响0人
小小的河
# Uncomment the next line to define a global platform for your project
platform :ios, '15.0'
# Your project does not explicitly specify the CocoaPods master specs repo. Since CDN is now used as the default, you may safely remove it from your repos directory via `pod repo remove master`. To suppress this warning please add `warn_for_unused_master_specs_repo => false` to your Podfile.
##忽略.cocoapods中多个specs源引起的警告问题
install! 'cocoapods', :warn_for_unused_master_specs_repo => false
target 'XXX' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# 网络
pod 'Alamofire', '~> 5.4'
pod 'Moya', '~> 15.0' #对Alamofire的二次封装
# JSON解析
pod 'HandyJSON', '~> 5.0.2' #和YYModel类似,用了runtime,不需要写map
pod 'SwiftyJSON', '~> 4.0' #不需要定义Model,直接使用字段
# 响应式编程框架
pod 'RxSwift'
pod 'RxCocoa'
pod 'RxDataSources'
# 弹窗提示
pod 'SwiftMessages'
#UI布局
pod 'SnapKit' #自动布局库
pod 'Then' #配合'SnapKit',使用链式语法
pod "R.swift"
#图片库
pod 'Kingfisher' #图片下载和缓存
#轮播图
pod 'FSPagerView'
# 输入框随键盘移动
pod 'IQKeyboardManagerSwift'
# 提供加密相关的方法
pod 'CryptoSwift'
#本地存储
pod 'SwiftyUserDefaults'
end
post_install do |installer|
# XCode14.1之后,要求最低的构建版本为11.0,这里是为了解除警告
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 11.0
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
end
end
end
end