source 'https://cdn.cocoapods.org/'
source 'https://github.com/cleveradssolutions/CAS-Specs.git'

platform :ios, '13.0'
use_frameworks! :linkage => :static
$casVersion = '~> 3.5.2'

target 'Quiz' do
  pod 'lottie-ios', '3.3.0'
  #pod 'Google-Mobile-Ads-SDK', '8.11.0'
  pod 'Firebase'
  pod 'FirebaseAuth'
  pod 'FirebaseAnalytics'
  pod 'FirebaseCrashlytics'
  pod 'FirebaseMessaging'
  pod 'FirebaseDynamicLinks'
  pod 'FirebaseRemoteConfig'
  pod 'Socket.IO-Client-Swift', '~> 15.2.0'
  
  pod 'CleverAdsSolutions-SDK/Optimal', $casVersion

  pod 'YandexMobileAds', '6.2.0'
#  pod 'YandexMobileMetrica/Dynamic', '3.17.0'
  
  ## FB
  #pod 'FBSDKCoreKit', '~> 8.0.0'
  #pod 'FBSDKLoginKit', '~> 8.0.0'
  #pod 'FBSDKShareKit', '~> 8.0.0'
  ## Mediation
  #pod 'GoogleMobileAdsMediationFacebook'
  
  pod 'RxSwift', '~> 5'
  pod 'RxCocoa', '~> 5'
  
  pod 'UnityAds'
end

target 'QuizTests' do
  pod 'lottie-ios', '3.3.0'
  #pod 'Google-Mobile-Ads-SDK', '8.11.0'
  pod 'Firebase'
  pod 'FirebaseAuth'
  pod 'FirebaseAnalytics'
  pod 'FirebaseCrashlytics'
  pod 'FirebaseMessaging'
  pod 'FirebaseDynamicLinks'
  pod 'FirebaseRemoteConfig'
  pod 'Socket.IO-Client-Swift', '~> 15.2.0'
  
  pod 'CleverAdsSolutions-SDK/Optimal', $casVersion

  pod 'YandexMobileAds', '6.2.0'
#  pod 'YandexMobileMetrica/Dynamic', '3.17.0'

## FB
#pod 'FBSDKCoreKit', '~> 8.0.0'
#pod 'FBSDKLoginKit', '~> 8.0.0'
#pod 'FBSDKShareKit', '~> 8.0.0'

  pod 'RxSwift', '~> 5'
  pod 'RxCocoa', '~> 5'
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
      xcconfig_path = config.base_configuration_reference.real_path
      xcconfig = File.read(xcconfig_path)
      xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
      File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
    end
  end
end
