Blog

I mainly write about my professional endeavours with Swift, Objective-C, Xcode and the Apple technologies. Those take place in a corporate environment in which we design, develop and deliver apps for all major platforms (including Windows and Android) and multiple customers. Our apps are native and brandable clients for our cloud solutions targeted at hosters and telecommunication companies. My personal focus is set on native apps for macOS.

How I Test Functions Which Dispatch Tasks

Some functions dispatch tasks or code blocks to a different dispatch queue. I have wrapped the wait for that asynchronous code in an extension to XCTestCase.

How I Test View Controllers

By example I want to show how I instantiate and test view controllers from a storyboard in a macOS app using the conventional MVC pattern and AppKit.

Restore Clean NSFileProviderReplicatedExtension Environment

While developing and porting macOS file provider extensions based on NSFileProviderReplicatedExtension I sometimes ended up in a messed up state of my environment. I found these steps to restore a clean environment again.

How to write a Swift Mock Code Generator in Swift

Incontent with the Swift mocking solutions available I thought about how to write a mock code generator for Swift by myself. Getting started is surprisingly easy with Swift packages like Swift Argument Parser and SwiftSyntax.

How to manage Login Items in Swift

There is a Mac App Store and Sandbox compatible method to implement automatic launch on login. Checking the enablement status before macOS 13 Ventura is a bit tricky, though.

Resetting a Privacy Choice on macOS

macOS shows a privacy choice prompt for certain aspects like the address book only when an app requests access the first time. This simple terminal command erases the saved choice.

Passing Build Settings Into Property Lists

An app which is customizable for different brands and customers also requires a parameterized build configuration. Some values need to be accessible during runtime, too, while retaining a single source of truth. This is more elegant take on what could have been achieved with preprocessor macros in Objective-C times.

Working with Accessibility in Mind

Bring the macOS accessibility feature toggle into the menu bar and quickly inspect your projects with as little as two clicks.

Embedded App Naming Conflict Resolved with Bundle Display Name

The app I am working on has a customizable bundle name and embeds another app which should appear with the same name. This causes a conflict which can be overcome by using CFBundleDisplayName.

Packages Not Supported with Legacy Build Locations

When I was messing around with Xcode build settings I summoned the tenacious error of unsupported Swift packages in combination with legacy build locations.