Sharing data between an app extension and a containing app in macOS

I was developing a Safari App Extension and needed a way to share data between the containing app and the extension. I needed to pass the user settings, so the extension would behave correctly. The containing app does not have a direct access to the extension’s properties and vice versa….

Using DispatchSemaphore to control asynchronous resources

A counting semaphore is a way of controlling access to a resource from multiple contexts. It can be also a solution for handling asynchronous methods in command line utilities. I was making a command line utility to access REST APIs recently. I needed a way to make sure that the…