source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/aliyun/aliyun-specs.git'

use_frameworks!
platform :ios, '12.0'

target 'FreeSign' do
  pod 'QMUIKit', '4.4.2'
  
  pod 'TYPagerController', '~> 2.0'
  pod 'MJRefresh'
  pod 'Material', '~> 2.0'
  pod 'SnapKit', '~> 5.6.0'
  pod 'STPopup'
  pod 'TZImagePickerController'
  
  pod 'RxSwift', '~> 5.0'
  pod 'RxCocoa', '~> 5.0'
  pod 'RxAlamofire'
  pod 'Alamofire', '~> 5.0'
  pod 'AlamofireImage', '~> 4.1'
  
  pod 'HandyJSON', '5.0.2-beta'
  pod 'SwiftDate'
  pod 'AsyncSwift'
  pod 'TPKeyboardAvoiding'
  pod 'YTKKeyValueStore'
  pod 'DeviceKit'
  
  pod 'IOSSecuritySuite'
  pod 'SwiftyRSA'
  pod 'OpenSSL-Universal', '1.1.170'
  pod 'SSZipArchive'
  pod 'SwiftyMarkdown'
  # 友盟在部分 Mac/Xcode 上 Copy XCFrameworks 会失败，且当前 umengAppkey 未启用，故移除
  # pod 'UMCommon'
  # pod 'UMDevice'
  # pod 'UMAPM'
end

post_install do |installer|
  installer.pods_project.build_configurations.each do |config|
    config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
  end

  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
      
      # 修复 HandyJSON 崩溃
      if target.name == 'HandyJSON'
        config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Onone'
        config.build_settings['SWIFT_COMPILATION_MODE'] = 'singlefile'
      end
    end
  end
end
# Swift Package Manager
# AltSign: https://github.com/rileytestut/AltSign.git
# libplist: https://github.com/libimobiledevice/libplist.git
