Topic

Macos

A browsable archive of writing and notes across the site.

Post

CoreData With CloudKit

Integrating your codebase with CloudKit is actually a tricky thing for me, since the first impression CloudKit gave me several years ago wasn’t good. In recent days, I had to …

Post

How to find a Mac app's BundleID

Every iOS and macOS app stores its configuration in a plist file, and the app’s BundleID lives in there alongside the version number. Read the plist and you’ve got …

Post

A few notes on LetsMove

When you download a Mac app from the web, it usually ends up in your Downloads folder. But some apps really need to live in /Applications to work properly — self-update being the …

Post

XPC Services

About XPC I’ve been doing some work in this area lately, so here are my notes — a quick recap of what XPC is and how it works. XPC is the umbrella term for inter-process …

Post

Codable && Tuple

While learning Swift, I keep finding interesting things. Codable is one of them. Today, I defined a model with a tuple type, then Xcode gave me an error. The code might look like …

Post

How to generate a NSViewController without a Nib?

Recently, I created all the ViewControllers through the storyboard or the Nib (for views). Today, when I created a demo project without any Nib file, the ViewController did not …

Post

A Swift quiz

A puzzle showed up on Twitter the other day. It exercises overload resolution and type(of:) together. This is just a note for myself; I’ll write up MetaType separately. // …

Post

Libraries and frameworks

Most of us have a rough mental model of what a library and a framework are. This post lays out the basics — not every byte, just enough to be useful. I covered the broader compile …

Post

Build Process

A programming language goes through roughly five stages on its way to a running program, each with its own tool: Preprocessor Compiler Assembler Linker Loader Let’s walk …

Post

Building a little utility: Swwwitch

I saw something making the rounds in the dev community recently, so I built a small tool — a quick way to consolidate a few Cocoa-app features I’d been meaning to try. …

Post

How Mac apps launch at login

Launching at login is one of the most common features for a Cocoa app — especially the menu-bar utilities that are meant to be always-on. Let’s walk through how to add this …

Post

How do dockless Mac apps work?

Menu-only apps are one of the most common patterns in Cocoa-land. They don’t take up a spot in your Dock, they don’t get in the way when you’re switching across …

Post

Using Yinxiangbiji in Safari on an English-language macOS

Evernote runs a separate account system in China — Yinxiangbiji (印象笔记) — and last year the team there spun off entirely. But the Safari Web Clipper is still the same extension …

Post

Adding a backgroundColor to NSView

NSView is the most basic building block in Cocoa — the foundation of every Mac app’s view hierarchy, exactly like UIView is for iOS. But the dead-simple backgroundColor …

Post

The Subjects in RxSwift

All diagrams in this post are from the book RxSwift - Reactive Programming with Swift. In the Rx world, a Subject is something that’s both an observer and an observable. The …

Post

Apple Event Sandboxing

Background I’ve been working on a small Mac app that runs an AppleScript to pull data out of OmniFocus and visualize it. Problem: it kept coming back with no data. The cause …

Post

Tracking down a Shadowsocks traffic leak

Update — 2019-01-29 First thing this morning, the moment I plugged into the office network the download rate shot up to 600 KB/s. Sure enough, it was that same …