platform :ios, '11.2'
inhibit_all_warnings!

# Enable this when working on local pods (due to Xcode bug) - https://www.ralfebert.de/ios/blog/cocoapods-clean-input-output-files/
#install! 'cocoapods', :disable_input_output_paths => true

abstract_target 'SleepCycle' do
  #use_frameworks!
    use_modular_headers!

    pod 'Fabric'
    pod 'Crashlytics'

    pod 'FBSDKCoreKit', '~> 5'
    pod 'FBSDKLoginKit', '~> 5'
    pod 'FBSDKShareKit', '~> 5'
    pod 'AFNetworking', '~> 2'
    pod 'AFNetworkActivityLogger', '~> 2'
    pod 'Alamofire', '~> 5.0.0-rc.2'
    pod 'DPHue', :git => 'https://github.com/Nifly/DPHue'
    pod 'Block-KVO', :git => 'https://github.com/Tricertops/Block-KVO.git'
    pod 'Flurry-iOS-SDK/FlurrySDK'
    pod 'ZipKit', '~> 1.0'
    pod 'CocoaAsyncSocket', :git => 'https://github.com/Nifly/CocoaAsyncSocket'
    pod 'ZendeskSDK', '~> 1.6.2'
    pod 'Adjust', '~> 4.11'
    pod 'SBJson'
    pod 'SwiftLint'
    pod 'NXOAuth2Client'        # RunKeeper integration
    pod 'DeviceKit', '~> 2.0'
    pod 'DateToolsSwift'
    pod 'PureLayout'
    pod 'lottie-ios'
    pod 'AsyncSwift'
    pod 'GoogleSignIn', '~> 5.0'
    pod 'PopupDialog', :git => 'https://github.com/pontusm/PopupDialog'
    #pod 'PopupDialog', :path => '../PopupDialog'

    pod 'Amplitude-iOS', '~> 4.6'
    pod 'Leanplum-iOS-SDK', '2.6.2'
    pod 'Firebase/Core', '~> 5'
    pod 'Firebase/Auth', '~> 5'
    pod 'Firebase/Analytics'
    
    target 'GoodMorning' do
    end

    target 'GoodMorningTests' do
    end
    
    # Import dependencies from libs
    podspec :path => '../XCore/XCore.podspec'
    podspec :path => '../XApp/XApp.podspec'
end

post_install do |installer|
    # Turn on 'whole module optimization' for Pods project
    installer.pods_project.build_configurations.each do |config|
        if config.name == 'Release'
            config.build_settings['SWIFT_COMPILATION_MODE'] = 'wholemodule'
        end
    end
    
    # Override Swift version in old pod
    installer.pods_project.targets.each do |target|
      if target.name == 'DynamicBlurView'
        target.build_configurations.each do |config|
          config.build_settings['SWIFT_VERSION'] = '5.0'
        end
      end
    end

    # Ensure that we use the deployment target version of the project
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
      end
    end
end

#target 'SCWatch Extension' do
    #use_frameworks!
    #platform :watchos, '4.0'
    #pod 'ZIPFoundation', '~> 0.9'
    #end

