feat(ipad): first successful ipad build

Signed-off-by: Sienna Meridian Satterwhite <sienna@r3t.io>
This commit is contained in:
2025-12-14 22:50:35 +00:00
parent 8f829e9537
commit 5cafe89e4f
21 changed files with 1224 additions and 465 deletions

46
scripts/ios/Info.plist Normal file
View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>app</string>
<key>CFBundleIdentifier</key>
<string>io.r3t.aspen</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Aspen</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>MinimumOSVersion</key>
<string>14.0</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
</dict>
</plist>

21
scripts/ios/build-simulator.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
set -e
# iOS Simulator Build Script
# Builds the Marathon app for iOS simulator (aarch64-apple-ios-sim)
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
echo "🔨 Building for iOS Simulator..."
echo "Project root: $PROJECT_ROOT"
# Build for simulator target
cd "$PROJECT_ROOT"
cargo build \
--package app \
--target aarch64-apple-ios-sim \
--release
echo "✅ Build complete!"
echo "Binary location: $PROJECT_ROOT/target/aarch64-apple-ios-sim/release/app"

70
scripts/ios/deploy-simulator.sh Executable file
View File

@@ -0,0 +1,70 @@
#!/bin/bash
set -e
# iOS Simulator Deploy Script
# Boots simulator, installs app, and launches it
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
APP_NAME="Aspen"
BUNDLE_ID="io.r3t.aspen"
TARGET="aarch64-apple-ios-sim"
BUILD_MODE="release"
APP_BUNDLE="$PROJECT_ROOT/target/$TARGET/$BUILD_MODE/$APP_NAME.app"
# Default to iPad Pro 12.9-inch M2 (matches user's physical device)
DEVICE_NAME="${1:-iPad Pro 12.9-inch M2}"
echo "📱 Deploying to iOS Simulator..."
echo "Device: $DEVICE_NAME"
echo "Bundle: $APP_BUNDLE"
# Check if bundle exists
if [ ! -d "$APP_BUNDLE" ]; then
echo "❌ App bundle not found! Run package-app.sh first."
exit 1
fi
# Get device UUID
echo "🔍 Finding device UUID..."
DEVICE_UUID=$(xcrun simctl list devices | grep "$DEVICE_NAME" | grep -v "unavailable" | head -1 | sed -E 's/.*\(([0-9A-F-]+)\).*/\1/')
if [ -z "$DEVICE_UUID" ]; then
echo "❌ Device '$DEVICE_NAME' not found or unavailable."
echo ""
echo "Available devices:"
xcrun simctl list devices | grep -i ipad | grep -v unavailable
exit 1
fi
echo "✅ Found device: $DEVICE_UUID"
# Boot device if not already booted
echo "🚀 Booting simulator..."
xcrun simctl boot "$DEVICE_UUID" 2>/dev/null || true
# Wait a moment for boot
sleep 2
# Open Simulator.app
echo "📱 Opening Simulator.app..."
open -a Simulator
# Uninstall old version if it exists
echo "🗑️ Uninstalling old version..."
xcrun simctl uninstall "$DEVICE_UUID" "$BUNDLE_ID" 2>/dev/null || true
# Install the app
echo "📲 Installing app..."
xcrun simctl install "$DEVICE_UUID" "$APP_BUNDLE"
# Launch the app
echo "🚀 Launching app..."
xcrun simctl launch --console "$DEVICE_UUID" "$BUNDLE_ID"
echo "✅ App deployed and launched!"
echo ""
echo "To view logs:"
echo " xcrun simctl spawn $DEVICE_UUID log stream --predicate 'processImagePath contains \"$APP_NAME\"'"

57
scripts/ios/package-app.sh Executable file
View File

@@ -0,0 +1,57 @@
#!/bin/bash
set -e
# iOS App Bundle Packaging Script
# Creates a proper .app bundle for iOS simulator deployment
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
APP_NAME="Aspen"
BUNDLE_ID="io.r3t.aspen"
TARGET="aarch64-apple-ios-sim"
BUILD_MODE="release"
BINARY_PATH="$PROJECT_ROOT/target/$TARGET/$BUILD_MODE/app"
APP_BUNDLE="$PROJECT_ROOT/target/$TARGET/$BUILD_MODE/$APP_NAME.app"
echo "📦 Packaging iOS app bundle..."
echo "Binary: $BINARY_PATH"
echo "Bundle: $APP_BUNDLE"
# Check if binary exists
if [ ! -f "$BINARY_PATH" ]; then
echo "❌ Binary not found! Run build-simulator.sh first."
exit 1
fi
# Remove old bundle if it exists
if [ -d "$APP_BUNDLE" ]; then
echo "🗑️ Removing old bundle..."
rm -rf "$APP_BUNDLE"
fi
# Create .app bundle structure
echo "📁 Creating bundle structure..."
mkdir -p "$APP_BUNDLE"
# Copy binary
echo "📋 Copying binary..."
cp "$BINARY_PATH" "$APP_BUNDLE/app"
# Copy Info.plist
echo "📋 Copying Info.plist..."
cp "$SCRIPT_DIR/Info.plist" "$APP_BUNDLE/Info.plist"
# Create PkgInfo
echo "📋 Creating PkgInfo..."
echo -n "APPL????" > "$APP_BUNDLE/PkgInfo"
# Set executable permissions
chmod +x "$APP_BUNDLE/app"
echo "✅ App bundle created successfully!"
echo "Bundle location: $APP_BUNDLE"
echo ""
echo "Bundle contents:"
ls -lh "$APP_BUNDLE"