Skip to content

People have dreamed of running macOS on iPad for more than a decade. Today, that dream comes true. With Virtual Mac, iPad finally breaks free from iPadOS, enabling pro apps like Xcode, Terminal, Final Cut Pro, Logic Pro, and Pixelmator Pro to run directly on device. Requires iPad Pro (M1, M2) or iPad Air (M1) running iPadOS 14 up to 16.3.1.

Shell
827 B
Raw Blame
#!/bin/bash

set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
# shellcheck source=../lib/common.sh
source "$SCRIPT_DIR/../lib/common.sh"

: "${VZ_REAL_MAC_WORK:?set VZ_REAL_MAC_WORK on the reference Mac}"
: "${VZ_REAL_MAC_VM:?set VZ_REAL_MAC_VM to the VM bundle on the reference Mac}"
REMOTE_ROOT="$VZ_REAL_MAC_WORK"
APP="$REMOTE_ROOT/DerivedData/Build/Products/Debug/macOSVirtualMachineSampleApp-Objective-C.app"

need_command sshpass

active="$(real_mac_ssh \
    "pgrep -f 'macOSVirtualMachineSampleApp-Objective-C|com.apple.Virtualization.VirtualMachine' || true")"
[[ -z "$active" ]] ||
    die "a Virtualization VM is already active on the real Mac (PIDs: $active)"

real_mac_ssh "test -d '$VZ_REAL_MAC_VM'; test -d '$APP'; open -n '$APP'"
echo "launched the arm64 Objective-C sample with system frameworks"