platform :ios, '18.0'

target 'PayjoinReactNative' do
  use_frameworks!
  
  # React Native dependencies
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge',
    'DevSupport',
    'RCTText',
    'RCTNetwork',
    'RCTWebSocket',
  ]
  pod 'React-Core', :path => '../node_modules/react-native'
  pod 'React-RCTLinking', :path => '../node_modules/react-native/React'
  pod 'LibWally', '~> 0.3'

  # Add Payjoin native module
  pod 'PayjoinReactNative', :path => '../ios'

  # Specify Swift version
  post_install do |installer|
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['SWIFT_VERSION'] = '5.0'
      end
    end
  end
end