flutter-tsnet/ios/tailscale_kit.podspec
Mathias Beaulieu-Duncan 2dbadcd8ed Initial commit: embedded Tailscale tsnet Flutter plugin for remote heater access
Go layer (c-archive) provides a localhost TCP proxy through a WireGuard tunnel.
Flutter connects gRPC to localhost:PORT, Go forwards via tsnet to heater's Tailscale IP.
No VPN entitlement needed — uses userspace netstack.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 05:13:55 -04:00

52 lines
1.9 KiB
Ruby

Pod::Spec.new do |s|
s.name = 'tailscale_kit'
s.version = '0.1.0'
s.summary = 'Embedded Tailscale tsnet for Flutter'
s.description = <<-DESC
Provides a WireGuard tunnel to Constellation heaters via embedded tsnet.
Built with go build -buildmode=c-archive (production Go approach).
No VPN entitlement needed uses userspace netstack.
DESC
s.homepage = 'https://github.com/constellation-heating/tailscale-kit'
s.license = { :type => 'MIT' }
s.author = { 'Constellation Heating' => 'dev@constellation-heating.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*.{swift,h}'
s.public_header_files = 'Classes/**/*.h'
s.preserve_paths = 'TailscaleKit.xcframework'
s.dependency 'Flutter'
s.platform = :ios, '14.0'
s.swift_version = '5.0'
s.libraries = 'resolv'
s.pod_target_xcconfig = {
'DEFINES_MODULE' => 'YES',
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 x86_64',
# Force-link the Go static library into this pod's dynamic framework
'OTHER_LDFLAGS' => '$(inherited) -force_load "$(PODS_TARGET_SRCROOT)/_current_slice/TailscaleKit.framework/TailscaleKit"',
}
s.user_target_xcconfig = {
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 x86_64',
}
# Before compile: symlink the correct xcframework slice for the current platform
s.script_phase = {
:name => 'Select TailscaleKit Slice',
:script => <<-'SCRIPT',
PLUGIN_DIR="${PODS_TARGET_SRCROOT}"
LINK="${PLUGIN_DIR}/_current_slice"
rm -f "$LINK"
if [ "$PLATFORM_NAME" = "iphonesimulator" ]; then
ln -sf "TailscaleKit.xcframework/ios-arm64-simulator" "$LINK"
else
ln -sf "TailscaleKit.xcframework/ios-arm64" "$LINK"
fi
echo "TailscaleKit: selected $PLATFORM_NAME slice"
SCRIPT
:execution_position => :before_compile,
}
end