Add a native iOS client for relay-based file sharing

The SwiftUI app bundles the Go swarm engine through gomobile, so an iPhone is a real peer using the existing PAKE handshake, chunk verification, and relay fallback. XcodeGen builds the project and devicectl installs it on the paired phone.
This commit is contained in:
2026-10-26 22:24:47 +08:00
parent 29fa4a4c44
commit 9a37e93cfc
23 changed files with 2458 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
#!/usr/bin/env bash
# Build the native iOS app. Usage:
# ./build.sh simulator (default)
# ./build.sh device (signed with the TZGyn team)
set -euo pipefail
HERE="$(cd "$(dirname "$0")" && pwd)"
TARGET="${1:-simulator}"
"$HERE/build-go.sh"
cd "$HERE"
xcodegen generate
case "$TARGET" in
simulator|sim)
xcodebuild \
-project Share.xcodeproj \
-scheme Share \
-configuration Debug \
-sdk iphonesimulator \
-destination 'generic/platform=iOS Simulator' \
ARCHS=arm64 ONLY_ACTIVE_ARCH=NO \
-derivedDataPath /tmp/share-dd \
build
;;
device)
xcodebuild \
-project Share.xcodeproj \
-scheme Share \
-configuration Debug \
-sdk iphoneos \
-destination 'generic/platform=iOS' \
-allowProvisioningUpdates \
-derivedDataPath /tmp/share-dd-device \
build
;;
*)
echo "usage: $0 [simulator|device]" >&2
exit 2
;;
esac