Pod::Spec.new do |s|
  s.name             = 'tsnet_flutter'
  s.version          = '0.2.0'
  s.summary          = 'Embedded Tailscale tsnet for Flutter (macOS)'
  s.description      = <<-DESC
Embed Tailscale's tsnet in Flutter apps. Provides a userspace WireGuard
tunnel with a localhost TCP proxy. Built with go build -buildmode=c-archive.
                       DESC
  s.homepage         = 'https://github.com/svrnty/tsnet_flutter'
  s.license          = { :type => 'BSD-3-Clause', :file => '../LICENSE' }
  s.author           = { 'Svrnty' => 'mathias@svrnty.io' }
  s.source           = { :path => '.' }
  s.source_files     = 'Classes/**/*.{swift,h}'
  s.public_header_files = 'Classes/**/*.h'
  s.preserve_paths   = 'TailscaleKit.xcframework'
  s.dependency 'FlutterMacOS'
  s.platform         = :osx, '12.0'
  s.swift_version    = '5.0'

  s.libraries        = 'resolv'

  s.pod_target_xcconfig = {
    'DEFINES_MODULE' => 'YES',
    'OTHER_LDFLAGS' => '$(inherited) -force_load "$(PODS_TARGET_SRCROOT)/TailscaleKit.xcframework/macos-arm64_x86_64/TailscaleKit.framework/TailscaleKit"',
  }
end
