Xcode: Missing Package Product (local package)

When adding a local Swift package to your Xcode project, you might encounter the following error: Missing package product `PACKAGE_NAME` The issue often occurs when the package you’re trying to add is already open in Xcode. To resolve: Close the package in Xcode. Close your main project. Reopen your main project. I’m not sure what might be causing this issue or why reopening the project is required (a clean build won’t do)....

June 24, 2024 · Bartosz Kunat

Keeping Safari Windows Open: A Tab Group Workaround

tldr: In order to keep the current Safari window open when you close the last tab, use tab groups. Last month, I once again switched my default web browser to Safari. It has its quirks, but I missed it in a weird way. I initially switched to Firefox because of its stellar support for vim keybindings and some other extensions I started to enjoy. Even with all those improvements, I began to miss some niceties that Safari has built-in....

May 18, 2024 · Bartosz Kunat

Open Any Xcode Project Type with a Shell Script

In my current role, we have around 30 projects distributed across roughly 20 different repositories. Most of them are Swift packages for various features used in our apps. This setup requires me to frequently switch between multiple projects. Just a few days ago, I was working on the login flow. This involved modifying two Swift packages and one Xcode project. Remembering whether a given project is a Swift package, a workspace (....

April 29, 2024 · Bartosz Kunat

Working with Local Swift Packages

Imagine you’re working on Project A, which relies on Package B, a remote Swift package. To incorporate modifications in B and assess their impact on A, the standard approach requires committing and pushing the changes in B, updating B’s version in A, and then rebuilding A to observe the outcomes. This method is slow and cumbersome. There must be a better way! Project A | └──> Swift Package B To speed up and improve the workflow, you can convert the remote dependency B to a local one....

February 27, 2024 · Bartosz Kunat

Alfred Snippet Converter

A few months ago, I wrote about Alfred Snippets on iOS. In that article, I described the manual process of converting Alfred text snippets into macOS text replacements. Since then, I’ve had time to refine this project and add some new features. You can download the final Command Line Interface (CLI) or the macOS app from this link. Next on my list is the complete automation of the process of synchronizing Alfred text snippets with macOS text replacements....

December 27, 2023 · Bartosz Kunat

Automating Adding SPM Plugins

How to automate adding plugins to all of your existing (and future) targets in a Swift package TL;DR package.targets = package.targets.map { target in var plugins = target.plugins ?? [] plugins.append(.plugin(name: "SwiftLintPlugin", package: "SwiftLint")) target.plugins = plugins return target } The Problem Last month, I was tasked with adding SwiftFormat and SwiftLint to one of the projects my team maintains. The project is medium-sized and uses Swift Package Manager (SPM) for modularization....

December 18, 2023 · Bartosz Kunat

My Alfred Setup

Last updated: 13/08/23 I’ve relied on Alfred as my daily driver for boosting productivity for years. However, I didn’t switch from Apple’s Spotlight overnight. It took three attempts before I truly embraced its capabilities. In this article I’ll share my Alfred setup and explain my most frequent workflows. Let’s dive in! The Initial Setup I’ve already described the initial setup in detail in New Mac Setup article, so be sure to check it if you’re interested....

August 13, 2023 · Bartosz Kunat

New Mac Setup

This note describes the steps I take when setting up a new Mac. This process could be mostly automated, but I can’t get myself to do it. It takes me around 90 minutes to go through all the steps. Let’s get started! Files to Import .gitconfig .zshrc Apps to Install Apps marked with “🌕” emoji are optional (it depends if it’s a work or a personal Mac). App Store Pause Clean Links Dynamo Meeter Preferences -> General -> Open at login Disable non-work related calendars Disable “Show countdown to next meeting” in Preferences -> Advanced Bear Notes Set themes Update Preferences -> Editor Set keyboard shortcuts Magnet Pixelmator Pro Balance Lock SourceryPro Vimari 🌕 Amphetamine 🌕 Color slurp 🌕 Boop 🌕 Wipr Web HomeBrew Alfred Disable both shortcuts for Spotlight Import preferences from /Users/$USER/Library/Application Support/Alfred/Alfred....

May 15, 2023 · Bartosz Kunat

Connectivity Issues with Logitech MX Keys on macOS Ventura

After installing macOS Ventura, I began experiencing connectivity issues when using MX Keys keyboard through Bluetooth. The keyboard would disconnect from my Mac whenever it was inactive for a few minutes. What made this issue especially frustrating was that it didn’t happen every time, and the time it took for the keyboard to reconnect varied widely. It drove me insane. I’ve been following several threads in r/logitech, reaching out to Logitech support multiple times, and submitting bug reports through the Logi Options+ app....

April 4, 2023 · Bartosz Kunat

Alfred Snippets on iOS

Alfred allows you to save your frequently used text clips as Snippets. Over the past few years I’ve created hundreds of them. There’s one problem. Alfred snippets only work on your Mac. Today we’ll focus on how we can convert them into macOS snippets. That way, you’ll be able to use them across all your Apple devices! How Alfred stores snippets as a Zip archive. On macOS, you can open it with the Archive Utility app that’s shipped with the system....

January 25, 2023 · Bartosz Kunat