source 'https://github.com/Com2uSPlatformCorp/HiveSDK-iOS.git'
source 'https://cdn.cocoapods.org/'

platform :ios, '11.0'
use_frameworks!
inhibit_all_warnings!

project 'HIVE_SDK_Cocos_Sample.xcodeproj'

def hivesdk_libs
  pod 'Hercules', '4.16.3.1'
  pod 'HiveSDK', '4.16.3.1'
  pod 'HiveTencentOpenAPI', '4.16.3.1'
  pod 'HiveWXApi', '4.16.3.1'
  pod 'HiveAppTrackingTransparency', '4.16.3.1'
  pod 'HiveExtensions', '4.16.3.1'
  pod 'HiveProviderAdjust', '4.16.3.1'
  pod 'HiveProviderAppsFlyer', '4.16.3.1'
  pod 'HiveProviderFacebook', '4.16.3.1'
  pod 'HiveProviderFirebase', '4.16.3.1'
  pod 'HiveProviderGoogle', '4.16.3.1'
  pod 'HiveProviderLine', '4.16.3.1'
  pod 'HiveProviderQQ', '4.16.3.1'
  pod 'HiveProviderSingular', '4.16.3.1'
  pod 'HiveProviderVK', '4.16.3.1'
  pod 'HiveProviderWechat', '4.16.3.1'
  pod 'HiveProviderWeverse', '4.16.3.1'
  pod 'HiveSDKPlugin', '4.16.3.1'
  pod 'HiveSDKPluginC2S', '4.16.3.1'
  pod 'HiveResource', '4.16.3.1'
end

def recaptcha_libs
  pod 'PromisesSwift', '2.1.1'
  pod 'GoogleDataTransport', '9.2.0'
  pod 'GoogleToolboxForMac/NSData+zlib', '2.1.0'
  pod 'Protobuf', '3.12.0'
  pod 'GoogleUtilities', '7.8.0'
  pod 'GTMSessionFetcher', '2.1.0'
end

target 'HIVE_SDK_Cocos_Sample' do
  project 'HIVE_SDK_Cocos_Sample.xcodeproj'
  hivesdk_libs
  recaptcha_libs
end

target 'CocosNotificationServiceExtension' do
  project 'HIVE_SDK_Cocos_Sample.xcodeproj'
  pod 'HiveExtensions', '4.16.3.1'
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      if ['LineSDKSwift'].include? target.name
        config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
      elsif config.build_settings['WRAPPER_EXTENSION'] == 'bundle'
        config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
      end
      config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
    end
  end
end
