# Fixes warning `Your project does not explicitly specify the CocoaPods master specs repo`.
source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '13.0'
use_frameworks!

target 'Example' do
  pod 'GradientLoadingBar', :path => '../'

# Development pods.
  pod 'SwiftFormat/CLI', '~> 0.41'
  pod 'SwiftLint', '~> 0.42'
  pod 'SwiftConfigurationFiles', :git => 'https://github.com/fxm90/SwiftConfigurationFiles.git'

  target 'ExampleTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'ExampleSnapshotTests' do
    inherit! :search_paths

    # Pods for snapshot testing.
    pod 'SnapshotTesting', '~> 1.9', :inhibit_warnings => true
  end

  post_install do |installer|
    # Fix issues with interface builder and cocoapods.
    # Source: https://github.com/CocoaPods/CocoaPods/issues/7606#issuecomment-484294739
    installer.pods_project.build_configurations.each do |config|
      next unless config.name == 'Debug'

      config.build_settings['LD_RUNPATH_SEARCH_PATHS'] = [
        '$(FRAMEWORK_SEARCH_PATHS)'
      ]
    end

    # We support all iOS versions starting from 9.0. Therefore we manually decrease the deployment target for `GradientLoadingBar` here,
    # so other (development / testing related pods) can use a higher deployment target, which is defined using `platform :ios` above.
    installer.pods_project.targets.each do |target|
      next unless target.name == 'GradientLoadingBar'

      target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
      end
    end
  end

end
