-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLaunch Aware.command
More file actions
executable file
·28 lines (22 loc) · 1.07 KB
/
Launch Aware.command
File metadata and controls
executable file
·28 lines (22 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# Double-click this file to build and launch Aware
cd "$(dirname "$0")"
APP_PATH="build/Build/Products/Debug/Aware.app"
# Build (errors will be visible)
if ! xcodebuild -scheme Aware -configuration Debug -derivedDataPath build build 2>&1; then
osascript -e 'display dialog "Build failed. Check the Terminal output for errors." with title "Aware" buttons {"OK"} default button 1 with icon stop'
exit 1
fi
# Clear quarantine so Gatekeeper allows first run
xattr -cr "$APP_PATH" 2>/dev/null || true
# Launch and verify the app started
open "$APP_PATH" || {
osascript -e 'display dialog "Failed to launch Aware.app" with title "Aware" buttons {"OK"} default button 1 with icon stop'
exit 1
}
# Wait and check if process is still running (crash = exits quickly)
sleep 2
if ! pgrep -x "Aware" >/dev/null; then
osascript -e 'display dialog "Aware launched but exited immediately (possible crash).\n\nRun from Xcode (Product → Run) to see crash logs, or check Console.app for errors." with title "Aware" buttons {"OK"} default button 1 with icon stop'
exit 1
fi