Relative Content

Tag Archive for swiftmacos

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).

Open a macOS bundle with a self written app

I will like to write an application that can work with one or more project at a time. It does not quite matter what the projects are. The important thing is that each project will be saved into a bundle (eg. a directory with the extension bundle which is mostly treated as file in macOS).