require_relative '../node_modules/react-native-macos/scripts/react_native_pods'

ENV['REACT_NATIVE_NODE_MODULES_DIR'] ||= File.expand_path('../node_modules/react-native-macos', __dir__)

prepare_react_native_project!

target 'sentry-react-native-sample-macOS' do
  platform :macos, '14.0'
  use_native_modules!

  # Flags change depending on the env values.
  flags = get_default_flags()

  use_react_native!(
    :path => '../node_modules/react-native-macos',
    :hermes_enabled => false,
    :fabric_enabled => ENV['RCT_NEW_ARCH_ENABLED'] == '1',
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  post_install do |installer|
    react_native_post_install(installer)
  end
end
