require_relative '../node_modules/react-native-macos/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

prepare_react_native_project!

def disable_fmt_consteval!(installer)
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      next unless target.name == 'fmt'

      config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'gnu++17'
    end
  end
end

target 'macOS' do
  platform :macos, '14'
  use_native_modules!

  use_react_native!(
    :path => '../node_modules/react-native-macos',
    :hermes_enabled => true,
    :fabric_enabled => true,
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  pod 'Sparkle'
  pod 'HotKey'

  post_install do |installer|
    react_native_post_install(installer)
    disable_fmt_consteval!(installer)
  end

end
