Fix macOS 15.0+ Compilation Error
Problem
Project fails to compile on macOS 15.0+ due to deprecated CGWindowListCreateImage API:
Solution
Added compatibility layer that automatically uses the appropriate screen capture API based on runtime macOS version.
Changes
• Makefile: Added deployment target and universal binary support • ColorPickerAction.m: Replaced deprecated API with compatibility wrapper • ScreenCaptureCompat.h/.m: New compatibility layer with runtime OS detection
Compatibility
• macOS 12.3+: Uses CGDisplayCreateImageForRect • macOS 10.15-12.2: Falls back to CGWindowListCreateImage (warnings suppressed) • Architectures: Universal binary (x86_64 + arm64) • Deployment: macOS 10.15+
Testing
✅ Builds on macOS 15.0 with Xcode 16
✅ Color picker working: ./cliclick cp:100,100 → 0 0 0
✅ All existing functionality preserved
No breaking changes - same CLI interface and behavior.