Skip to content

Commit 03faba1

Browse files
committed
fix: codesign app with correct identifier for macOS permissions
Without explicit codesigning, the app registers as "Electron" in macOS privacy settings instead of "SillyAgent", causing permission grants to not take effect. Add ad-hoc codesign step to build script and a restart hint to the permission modal for Screen Recording. Made-with: Cursor
1 parent 70a2d6a commit 03faba1

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

build-electron.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,13 +228,14 @@ cd "$FRONTEND_DIR"
228228
echo -e "${YELLOW}Running electron-builder...${NC}"
229229
npx electron-builder --mac
230230

231-
# Clear quarantine attributes from the built app to prevent App Translocation issues
232-
# This helps with the "overlay install" problem where the app won't start if installed over an existing version
233-
echo -e "${YELLOW}Clearing quarantine attributes...${NC}"
231+
# Ad-hoc codesign with correct identifier so macOS registers permissions
232+
# under "SillyAgent" instead of generic "Electron"
233+
echo -e "${YELLOW}Code-signing app with correct identifier...${NC}"
234234
APP_PATH=$(find "$FRONTEND_DIR/dist-electron" -name "*.app" -type d | head -1)
235235
if [ -n "$APP_PATH" ]; then
236+
codesign --force --deep --sign - --identifier com.sillyagent.app "$APP_PATH"
236237
xattr -cr "$APP_PATH" 2>/dev/null || true
237-
echo -e "${GREEN}Quarantine attributes cleared from: $(basename "$APP_PATH")${NC}"
238+
echo -e "${GREEN}Signed and cleared quarantine: $(basename "$APP_PATH")${NC}"
238239
fi
239240

240241
# Calculate build time

frontend/components/permission-modal.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ export function PermissionModal({ onPermissionsGranted }: PermissionModalProps)
139139
<p className="text-xs text-muted-foreground/60">
140140
If SillyAgent is not listed, click the "+" button to add it manually.
141141
</p>
142+
<p className="text-xs text-muted-foreground/60">
143+
Screen Recording permission requires restarting the app after granting.
144+
</p>
142145
</div>
143146
</DialogContent>
144147
</Dialog>

0 commit comments

Comments
 (0)