#source 'https://cdn.cocoapods.org/'
install! 'cocoapods', 
  :disable_input_output_paths => true,
 :generate_multiple_pod_projects => true,
  :warn_for_multiple_pod_sources => false
  
platform :ios, '9.0'
inhibit_all_warnings!

require 'bd_pod_extentions'
plugin 'cocoapods-bytedance-transform'
plugin 'cocoapods-unit-test'
bd_use_app("thirdParty","public")

target 'BDAutoTracker_Example' do
#  pod 'RangersKit',:testspecs => ['Tests'],:path => '../../RangersKit'
  pod 'RangersAppLog',
    :path => '../',
    :subspecs => [
      'Host/SG',
      'Host/VA',
      'Host/CN',
      'Core',
      'Unique',
      'Log',
      'Picker',
      'UITracker',
      'ET',
      'Filter',
      'Unique',
      'DevTools',
      'OneID',
      'Game'
    ],:testspecs => [
      'Tests',
    ],:inhibit_warnings => false
#  pod 'TTReachability', '>= 1.6.1'
  pod 'Aspects','1.4.1'
  pod 'XcodeCoverage', '>= 1.3.2'
end

def update_deployment_config(config = nil)
  return if config.nil?
  config.build_settings['ENABLE_BITCODE'] = 'YES'
  if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 9.0
    config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
  end
end

post_install do |installer|
  installer.pods_project.build_configurations.each do |config|
    update_deployment_config(config)
  end
  
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      update_deployment_config(config)
    end
  end
  ## for generate_multiple_pod_projects = true
  installer.generated_projects.each do |project|
    project.build_configurations.each do |config|
      update_deployment_config(config)
      config.build_settings["DEVELOPMENT_TEAM"] = "3ZW24P6GHC"
    end
    
    project.targets.each do |target|
      target.build_configurations.each do |config|
        update_deployment_config(config)
      end
    end
  end

end

