Swift常用第三方库

作者: 小小的河 | 来源:发表于2023-08-21 11:14 被阅读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

相关文章

网友评论

    本文标题:Swift常用第三方库

    本文链接:https://www.haomeiwen.com/subject/ownemdtx.html