build: support persistent signing identity for Accessibility

This commit is contained in:
2026-10-16 21:09:53 +02:00
parent ec32d31c8d
commit bc7e4fd013
2 changed files with 14 additions and 2 deletions
+2 -1
View File
@@ -2,6 +2,7 @@
APP := .build/Conjure.app
INSTALL_DIR ?= /Applications
CODE_SIGN_IDENTITY ?= -
build:
swift build -c release
@@ -11,7 +12,7 @@ build:
cp -R .build/release/Conjure_ConjureKit.bundle $(APP)/Contents/Resources/
swift Scripts/icon.swift .build/Conjure.iconset
iconutil -c icns .build/Conjure.iconset -o $(APP)/Contents/Resources/Conjure.icns
codesign --force --sign - $(APP)
codesign --force --sign "$(CODE_SIGN_IDENTITY)" $(APP)
run: build
swift Scripts/run.swift "$(APP)"
+12 -1
View File
@@ -19,7 +19,16 @@ For a user-only installation:
make install INSTALL_DIR="$HOME/Applications"
```
Quit the installed copy before reinstalling. Installation does not request administrator privileges. Builds are locally ad-hoc signed, not notarized for distribution.
Quit the installed copy before reinstalling. Installation does not request administrator privileges. Builds are ad-hoc signed by default and are not notarized for distribution. Ad-hoc signing ties Accessibility permission to a build's code hash: rebuilding and reinstalling can invalidate an existing grant even while Conjure remains enabled in System Settings.
To preserve permission across rebuilds, use the same code-signing certificate and app location every time:
```sh
security find-identity -v -p codesigning
make install CODE_SIGN_IDENTITY="<certificate SHA-1 from the list>"
```
Pass the same `CODE_SIGN_IDENTITY` to `make build` and `make run` too. If no identity is available, create a local certificate in **Keychain Access → Certificate Assistant → Create a Certificate…**, choosing **Self Signed Root** and **Code Signing**, or use an Apple-issued development certificate. Keep that certificate and its private key; recreating it changes the signing identity. After switching from ad-hoc signing, re-add Conjure to Accessibility once.
To work on the project, open `Package.swift` in Xcode. Run the bundled app for its application identity and metadata; `make run` restarts the development bundle so rebuilt code takes effect.
@@ -97,6 +106,8 @@ Search for **Conjure Emoji**, identified by its centered 🤔 icon, and open it.
Use the arrow keys or Control-H/J/K/L to navigate left/down/up/right; the grid scrolls to keep the selected emoji visible. Return, clicking an emoji, or **Copy and Paste** copies it, dismisses Conjure, and tries to paste into the app that was focused when the launcher opened. Automatic pasting requires **System Settings → Privacy & Security → Accessibility → Conjure**; macOS prompts if permission is missing. After granting it, select an emoji again. If permission is denied, the previous app is unavailable, or focus cannot be restored promptly, the emoji stays copied for manual Command-V. Escape or the Back chevron returns to the launcher and restores your search.
If macOS keeps prompting despite an enabled Accessibility entry, quit Conjure, remove its stale entry with the minus button, add the exact app you launch (normally `/Applications/Conjure.app`), enable it, then reopen Conjure and retry. Avoid switching between installed and `.build` copies. For permission that survives rebuilds, configure certificate signing as described above. **Copy Emoji** followed by manual Command-V works without this permission.
Open **Actions** with Command-K for **Copy and Paste** (default), **Copy Emoji** (copy only, no Accessibility permission needed), **Favorite**, or **Remove Favorite**. Favorites are saved locally and grouped ahead of other emoji, with a small extra spacing break when browsing without a search. There are no star badges.
With Actions open, Escape or the Back chevron closes Actions first; another Back returns to Applications and restores your search. Command-W dismisses the entire launcher, including the current Command and its Actions. Switching destinations also removes the previous Command's Actions completely. Copy and Copy and Paste dismiss the launcher without an intermediate Back step.