For the vast majority of developers of software for Apple products, the process (har, har) of debugging involves attaching to and inspecting only one process: the main application binary. This is particularly true on iOS-based systems, where spawning subprocesses is not allowed, and arbitrary XPC services are limited. But developers of app extensions , a specialized Continue reading Attach to…
In the previous post, I described a problematic warning introduced by the new linker in Xcode 15. In it, I shared that the warning can be effectively disabled by passing a suitable argument to the linker: OTHER_LDFLAGS = -Wl,-no_warn_duplicate_libraries This simple declaration will address the problem on Xcode 15, but on Xcode 14 and earlier Continue reading Conditional Xcode Build Settings
Apple released Xcode 15 a couple weeks ago, after debuting the beta at WWDC in June, and shipping several beta updates over the summer. I ve been using the betas on my main work machine, and for months I ve been mildly annoyed by warnings such as these: ld: warning: ignoring duplicate libraries: '-lc++' ld: warning: ignoring Continue reading Xcode 15 Duplicate Library Linker Warnings
One of the most impactful changes to AppKit in the forthcoming macOS 14 Sonoma update is a change to the default clipping behavior for views. Apple announced that a long-present internal property, clipsToBounds , is now public. In tandem with this change, they are changing the default value for this property to false for apps that Continue reading View Clipping Changes in macOS 14 Sonoma
Apple added a new build setting to Xcode last year, ENABLE_USER_SCRIPT_SANDBOXING, which controls whether any Run Script build phases will be run in a sandbox or not. From the Xcode 14 Release Notes: You can now enable sandboxing for shell script build phases using the ENABLE_USER_SCRIPT_SANDBOXING build setting. Sandboxing blocks access to files inside the Continue reading Xcode Build Script…
tldr: MagicLoading is a reference implementation of a @ViewLoading-style property wrapper. I hadn t really paid too close attention to Swift s property wrapper features until my curiosity was piqued earlier this year by Apple s introduction of some very interesting wrappers designed to work with UIViewController, NSViewController, and NSWindowController. The aim in each case is to address Continue…
While perusing Xcode s AppleScript scripting dictionary, I was surprised to discover a rather robust example code section included right there among the usually spartan reference of the app s scriptable entities: Curious to learn more, I used a relatively little-known trick for examining the raw source code of a scripting dictionary. Simply click and drag from Continue reading Inline AppleScript…
Starting in macOS 13 Ventura, Apple is automatically opting-in most NSTextView instances to use TextKit 2, a modern replacement for the traditional NSLayoutManager based text system that has been part of Mac OS X since its debut. This change may bring a variety of surprises, so it s important to test carefully if you use NSTextView. Somewhat Continue reading Opting Out of TextKit 2 in NSTextView
A great article by Marc Edwards, essentially the missing manual for macOS menu bar extras: Apple’s HIG is great, but it doesn‘t contain much information related to designing menu bar extras. This article aims to provide additional details and context needed to create icons for macOS menu bar extras. There are a lot of subtleties Continue reading Designing macOS Menu Bar Extras
In recent months I ve noticed an accumulation of garbage log messages when I m debugging an app in Xcode. Line after line along the lines of: [] [0x124858a00] CVDisplayLinkStart [] [0x124858a20] CVDisplayLink::start [] [0x600003c3cee0] CVXTime::reset Today I went digging to find the source of these log messages, and in the process I discovered a workaround that Continue reading Quieting…