react_native_root = File.expand_path('../..', __dir__)
require Pod::Executable.execute_command('node', ['-p',
  'require.resolve("react-native/scripts/react_native_pods.rb", {paths: [process.argv[1]]})',
  react_native_root
]).strip

platform :ios, '15.0'
prepare_react_native_project!

target 'DanalPulseHost' do
  react_native_path = File.join(react_native_root, 'node_modules', 'react-native')

  use_react_native!(
    :path => react_native_path,
    :app_path => react_native_root
  )

  pod 'DanalPulse', :path => '../../../../ios'
  pod 'DanalPulseReactNative', :path => '../..'

  post_install do |installer|
    react_native_post_install(
      installer,
      react_native_path,
      :mac_catalyst_enabled => false
    )
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |configuration|
        configuration.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
        configuration.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
        configuration.build_settings['CODE_SIGNING_REQUIRED'] = 'NO'
      end
    end
  end
end
