-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-permissions.sh
More file actions
executable file
·49 lines (40 loc) · 1.39 KB
/
setup-permissions.sh
File metadata and controls
executable file
·49 lines (40 loc) · 1.39 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
set -e
echo "🔧 ntfy-macos Notification Permission Setup"
echo "==========================================="
echo ""
# Check if app bundle exists
if [ ! -d ".build/release/ntfy-macos.app" ]; then
echo "❌ App bundle not found. Run './build-app.sh' first."
exit 1
fi
echo "1. Resetting any previous permission state..."
tccutil reset UserNotifications com.laurentftech.ntfy-macos 2>/dev/null || true
echo "2. Opening the app to trigger permission request..."
echo ""
echo " 👀 WATCH FOR THE PERMISSION DIALOG!"
echo " It will ask: 'ntfy-macos Would Like to Send You Notifications'"
echo " Click 'Allow' when it appears"
echo ""
# Launch the app and keep it running
open -W -a .build/release/ntfy-macos.app --args test-notify --topic test &
APP_PID=$!
echo ""
echo "3. Waiting for you to respond to the permission dialog..."
sleep 8
echo ""
echo "4. Checking System Settings..."
open "x-apple.systempreferences:com.apple.preference.notifications"
echo ""
echo "✅ System Settings → Notifications is now open"
echo ""
echo " Please:"
echo " 1. Scroll down the left sidebar to find 'ntfy-macos'"
echo " 2. Click on it"
echo " 3. Toggle 'Allow Notifications' to ON"
echo ""
echo "Once you've done that, press Enter to continue..."
read
echo ""
echo "✅ Setup complete! Test with:"
echo " .build/release/ntfy-macos.app/Contents/MacOS/ntfy-macos test-notify --topic test"