use_frameworks!
platform :ios, '9.0'

abstract_target 'Example' do
  pod 'Realtime', :path => '../', :testspecs => ['Tests']
  pod 'Realtime/UI', :path => '../'

  target 'Realtime_Example' do
    pod 'Realtime/Firebase', :path => '../'

    pod 'Firebase/Auth'

    target 'Realtime_Tests' do
      inherit! :search_paths
    end
  end

  target 'Realtime_FDB' do
    pod 'RFDatabaseClient', :path => '../../Realtime+FoundationDB'
    pod 'ClientServerAPI', :path => '../../Realtime+FoundationDB'
    pod 'Realtime+FoundationDBModels', :path => '../../Realtime+FoundationDB'
    pod 'FoundationDBModels', :path => '../../Realtime+FoundationDB'
  end
end

target 'FormApp' do
  pod 'RealtimeForm/Combine', :path => '../'
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if (['Realtime'].include? target.name)
      target.build_configurations.each do |config|
          config.build_settings['ENABLE_TESTABILITY'] = 'YES'
          config.build_settings['SWIFT_VERSION'] = '5.0'
      end
    end
  end
end
