You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix accessibility permission not updating in app (#14)
* Fix accessibility permission detection in ClickIt Lite
The app was not recognizing when accessibility permissions were granted
because it checked immediately after opening System Settings, before the
user had a chance to grant permission. Now the app automatically detects
when it becomes active (e.g., user returning from System Settings) and
re-checks permissions at that time, properly updating the UI.
Changes:
- Added NSApplication.didBecomeActiveNotification observer to monitor app activation
- Re-check permissions automatically when app becomes active
- Removed premature permission check in requestAccessibilityPermission()
- Added proper cleanup in deinit to remove observer
Fixes: Permission banner now disappears and clicking is enabled after granting permission
* Refactor build system and fix emergency stop hotkeys
This commit addresses two major issues:
1. **Refactor build system to use separate SPM targets**
- Created separate ClickIt and ClickItLite targets in Package.swift
- Each target excludes the other's entry point file
- Both ClickItApp.swift and ClickItLiteApp.swift now have @main permanently enabled
- Updated build_app_unified.sh to build the correct SPM target
- No more file modification during builds - git working directory stays clean
- Updated BUILD_VERSIONS_GUIDE.md to reflect new approach
2. **Fix ESC emergency stop and add SPACEBAR support**
- Added local event monitor in addition to global monitor
- Global monitor catches events when app is inactive
- Local monitor catches events when app is active
- Added SPACEBAR as secondary emergency stop key
- Updated UI to show "Press ESC or SPACEBAR to emergency stop"
Benefits:
- Source files no longer modified during builds (fixes git status issues)
- Emergency stop now works reliably in all scenarios
- Users have two keys for emergency stop (ESC and SPACEBAR)
- Cleaner separation between Pro and Lite versions
Files changed:
- Package.swift: Added ClickItLite target with proper exclusions
- build_app_unified.sh: Updated to build correct SPM target
- Sources/ClickIt/Lite/ClickItLiteApp.swift: Uncommented @main
- Sources/ClickIt/Lite/SimpleHotkeyManager.swift: Added local monitor and SPACEBAR support
- Sources/ClickIt/Lite/SimplifiedMainView.swift: Updated UI text
- BUILD_VERSIONS_GUIDE.md: Updated documentation
* Fix SPM target paths for ClickIt and ClickItLite
SPM expects targets to either be in Sources/TargetName/ or have an explicit
path specified. Since both ClickIt and ClickItLite share Sources/ClickIt/,
we need to specify path: "Sources/ClickIt" for both targets.
This fixes the build error:
'Source files for target ClickItLite should be located under Sources/ClickItLite'
* Fix overlapping sources by separating target paths
The previous approach had both targets using the same path which caused
overlapping sources. Now:
- ClickIt target uses Sources/ClickIt and excludes the entire Lite directory
- ClickItLite target uses Sources/ClickIt/Lite exclusively
This eliminates the overlapping sources error while keeping files organized.
---------
Co-authored-by: Claude <[email protected]>
@@ -214,4 +213,4 @@ fastlane build_lite_debug # or build_debug for Pro
214
213
215
214
---
216
215
217
-
**Note**: The toggle script runs automatically during the build process, so you don't need to manually run it when using fastlane.
216
+
**Note**: The build system automatically selects the correct SPM target based on which fastlane command you use. No manual file modification is required - source files remain unchanged during builds.
0 commit comments