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.
42 lines
946 B
Bash
Executable File
42 lines
946 B
Bash
Executable File
#!/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
|