Relative Content

Tag Archive for swiftmacos

macOS ImageCaptureCore does not recognise scanners

I would like to develop a small macOS app using swift. I want to use ImageCaptureCore to access and control connected scanners ( via usb). I followed the official docs and wrote this ScannerManager. The code seems to be working without issues or warnings.

How do I capture the two-finger tap event on status bar?

I’m building a mac app with status bar icon. I want to enable two-finger tap guesture when tapping on the icon. Tried the following code, but even if I use
button.sendAction(on: .any), handleTwoFingerTap is not triggered.

Simulate a mouse click on another windows in Mac

I am trying to simulate a mouse click event in the new “IPhone Mirroring” feature that mac has to offer, I can do it via code that needs to take control of my mouse (moves my mouse and performs the click) but I am looking for a way to do it without having to give control of my computer. since I would like to automate some tasks on my IPhone.

Swift (macOS) hook into and intercept notifications, and customize delivery

I’m interested in building a utility for macOS that allows deeper customization of notifications from other apps that they might not offer the granularity of. For this I need to be able to hook into notifications, intercept them, read their content, and decide whether to show them, show without sound, suppress them (eg put in notifications center without playing).