-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresign.sh
More file actions
executable file
·23 lines (19 loc) · 1.38 KB
/
resign.sh
File metadata and controls
executable file
·23 lines (19 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# Re-sign Jot.app with correct bundle identifier for TCC permissions
APP_PATH="src-tauri/target/release/bundle/macos/Jot.app"
ENTITLEMENTS="src-tauri/Entitlements.plist"
INFO_PLIST="$APP_PATH/Contents/Info.plist"
if [ -d "$APP_PATH" ]; then
echo "Adding usage descriptions to Info.plist..."
/usr/libexec/PlistBuddy -c "Add :NSMicrophoneUsageDescription string 'Jot needs microphone access to record your voice during meetings for transcription.'" "$INFO_PLIST" 2>/dev/null || \
/usr/libexec/PlistBuddy -c "Set :NSMicrophoneUsageDescription 'Jot needs microphone access to record your voice during meetings for transcription.'" "$INFO_PLIST"
/usr/libexec/PlistBuddy -c "Add :NSScreenCaptureDescription string 'Jot needs screen recording permission to capture system audio (meeting participants) for transcription.'" "$INFO_PLIST" 2>/dev/null || \
/usr/libexec/PlistBuddy -c "Set :NSScreenCaptureDescription 'Jot needs screen recording permission to capture system audio (meeting participants) for transcription.'" "$INFO_PLIST"
echo "Re-signing Jot.app with com.jot.app identifier and entitlements..."
codesign --force --deep --sign - --identifier "com.jot.app" --entitlements "$ENTITLEMENTS" "$APP_PATH"
echo "✅ App re-signed successfully"
codesign -dvvv "$APP_PATH" 2>&1 | grep "Identifier="
else
echo "❌ App not found at $APP_PATH"
exit 1
fi