platform :ios, '16.0'

project 'suixinkan.xcodeproj',
        'Debug' => :debug,
        'SimulatorDebug' => :debug,
        'Release' => :release

target 'suixinkan' do
  use_frameworks!
  # 高德 SDK 未提供 arm64-simulator slice，仅在真机配置中接入。
  pod 'AMapFoundation-NO-IDFA', :configurations => ['Debug', 'Release']
  pod 'AMapLocation-NO-IDFA', :configurations => ['Debug', 'Release']
  pod 'AMap3DMap-NO-IDFA', :configurations => ['Debug', 'Release']
  pod 'AMapSearch-NO-IDFA', :configurations => ['Debug', 'Release']
  pod 'UMCommon'
  pod 'UMDevice'
  pod 'UMAPM'
  # 极光推送：固定无 IDFA 的 JCore，避免引入 ATT 授权。
  pod 'JCore', '5.4.2-noidfa'
  pod 'JPush', '6.1.0'
  pod 'IQKeyboardManagerSwift'
  # 微信 Open SDK：仅接入分享能力，不调用支付 API。
  pod 'WechatOpenSDK-XCFramework', '~> 2.0.4'

  target 'suixinkanTests' do
    inherit! :search_paths
  end
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'
      if target.name == 'Pods-suixinkanTests' && config.name == 'SimulatorDebug'
        config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = ''
      end
    end
  end
end
