❌

Normal view

NSPasteboard Crashes When Handling File Promises

3 August 2026 at 21:35

Wade Tregaskis:

NSPasteboard mutates itself simultaneously from the main thread and the global concurrent Dispatch pool, w.r.t. to its internal type cache. This is surprisingly trivial to reproduce (sample code below) by just dropping, e.g. a file promise (such as by opening a PNG in Preview, revealing the thumbnails sidebar, and then dragging the thumbnail onto the sample project’s window).

[…]

Since this bug causes semi-random memory corruption, it manifests in a large number of ways – not all of which are all that helpful.

[…]

SwiftUI’s onDrop(of:isTargeted:perform:) method makes no claims or promises as to what thread / queue it executes the closure on, and in fact according to the anonymous Apple engineer it never executes the closure on the main thread.

Now, while that may be the intent, the reality of that is wrong – in my experience it always executes the closure on the main thread (which makes a lot of sense to me as drag-and-drop event handling in AppKit has always been on the main thread in practice).

Apple also told him that NSPasteboard is not safe to use outside the main thread, even though that’s not documented, it’s not @MainActor, and Apple’s own code does do that.

EagleFiler 1.9.21

27 July 2026 at 21:11

EagleFiler 1.9.21 is a maintenance release of my Mac digital filing cabinet and e-mail archiving app. It can now capture the selected messages from MailMaven, including all their metadata, and can link back to the original message. The capture key now works with the Helium browser, and importing from Mariner Paperless and Microsoft Outlook is improved as well.

  • There was an interesting regression caused by the fact that macOS now implements pop-up menus using separate windows (NSPopupMenuWindow) that post their own notifications for becoming key and for resigning key status.

  • Encrypted libraries need to be converted to APFS, since a future version of macOS will drop support for CoreStorage. You can do this now, or it’s possible that we’ll be able to offer an automatic converter in a future version.

  • There were more problems with PyObjC importing symbols, this time generic Swift classes that have angle brackets in their names. I had previously added more precise imports to skip over these symbols, which aren’t needed anyway, so it’s a mystery why a few users were still seeing this problem despite using the same macOS versions as everyone else. In any case, I adjusted the PyObjC importer to hopefully avoid problems with all such symbols, even if Apple adds more in future versions.

  • macOS Tahoe introduced a bug displaying custom folder icons, which was finally fixed in macOS 26.4.1.

Previously:

AppKit in macOS 27

18 June 2026 at 19:56

macOS Golden Gate 27 Beta Release Notes:

AppKit adds NSRefreshController, providing pull-to-refresh functionality for NSScrollView.

[…]

NSToolbarItemGroup adds the role property and the NSToolbarItemGroupRole enum, allowing toolbar item groups to be tagged with a semantic role. NSSegmentedControl similarly adds a role property and the NSSegmentedControlRole enum, including a tabs role for controls that represent tab-based navigation and content selection.

[…]

NSTextSelectionManager provides common text selection interactions (click, drag, shift-click, double/triple-click word/line/paragraph selection) to a NSView with a set of NSGestureRecognizers rather than overriding NSEvent mouse methods. NSTextView now uses NSTextSelectionManager and provides its own set of NSGestureRecognizers to provide additional features in addition to text selection.

[…]

By default, NSMenu hides all menu item symbol images — non-symbol images remain visible. […] Use the new preferredImageVisibility property on NSMenuItem to customize the image visibility for your menu items. As in macOS 26.0, NSMenu automatically provides default visible menu item images for certain common system-wide menu items, such as Settings, Share, and Print.

AppKit updates:

Create events similar to UIControl events on NSControl with the new NSControl.Events type.

[…]

Initiate a drag operation from a gesture recognizer using the new beginDraggingSession(items:gesture:source:) method on NSView.

[…]

Update views automatically in response to Observable model changes using the guidance in Updating views automatically with observation tracking.

How is this different from what was announced last year?

Modernize your AppKit app:

Bring your AppKit app up to date with modern macOS conventions. Dive into handling input with control events and gesture recognizers, moving beyond traditional tracking loops. Enhance keyboard navigation in your app, implement graceful state restoration after restarts, and take advantage of new corner concentricity APIs that let your interface blend seamlessly with the macOS aesthetic.

Steve Troughton-Smith:

To summarize the singular AppKit session this year: hey remember all these APIs and design patterns from UIKit? Well they’re now in AppKit and you should use them! Also make your glass use interactive bounce effects.

Why? No reason!😉

TN3212:

In macOS 27, AppKit continues to standardize on gesture recognizers as the primary mechanism for input handling. This change directly affects Sidecar because gesture recognizers are the only way to respond to touch input from a Sidecar-connected iPad running iPadOS 27. If your app relies on tracking loops for mouse event handling, migrate to gesture recognizers to support Sidecar touch input.

This article explains how the gesture recognizer model works, how to implement gesture recognizers correctly for Sidecar touch input, how to update your existing event-handling code, and which APIs macOS 27 adds. Codebases that implement nextEvent(matching:) or mouseDown(with:), mouseDragged(with:), and mouseUp(with:) events are most affected by the updates discussed.

Greg Pierce:

After the AppKit session blindsided me a bit after telling me not to override mouseDown, and then telling me I should override hitTest

Mario Guzmán:

A few years ago, Apple introduced:

func tableView(_ tableView: NSTableView, userCanChangeVisibilityOf column: NSTableColumn) -> Bool

for NSTableView, which Is a native way users could control-click on a TableView column to show/hide columns.

This year, in #macOS27, they updated it to have a new “Reset to Defaults” option.

This is awesome bc I have done my own implementation of this feature JUST to have the option to “reset all columns” and now Apple just includes it!

Elevate your app’s text experience with TextKit:

Discover how to combine the convenience of built-in text views with the control of TextKit. We’ll show you how new APIs make it easy to extend UITextView and NSTextView with custom behaviors like line numbers and collapsible sections. We’ll also explore the TextKit architecture and walk through new caching and reuse policies for text attachments.

Previously:

UIKit in iOS 27

18 June 2026 at 19:56

iOS & iPadOS 27 Beta Release Notes:

[You] can use UIScene.extendStateRestoration and UIScene.completeStateRestoration to extend state restoration for UIScene.ActivationState.background to UIScene.ActivationState.foreground lifecycle transitions.

[…]

iOS and iPadOS apps built with the 27.0 SDK or later are required to include a launch screen.

[…]

Siri can load resources from drag interactions installed in your app’s interface.

[…]

In apps built with the iOS 27.0 SDK, a presented view controller inherits its trait collection by walking up its view’s superview chain through the intermediate views of the presentation, rather than jumping directly to the presentation controller.

UIKit updates:

Use UICollectionViewCompositionalLayoutSectionProvider closures as part of automatic observation tracking to automatically invalidate and update compositional layouts when observable objects change.

[…]

Use UIRefreshControl and UIStepper in Mac apps built with Mac Catalyst. These controls are now fully supported in the Mac idiom.

[…]

Starting in iOS 27, apps built with the latest SDK must use the scene-based life cycle or they fail to launch.

[…]

Use NSTextTable, NSTextBlock, and NSTextTableBlock to represent table structures in attributed strings.

Modernize your UIKit app:

Discover the latest updates to UIKit. Learn how to update your iPhone app layouts to work great when resized with iPhone Mirroring and on iPad. Explore new APIs for tab and navigation bars, find out how to prepare your app for new Apple Intelligence capabilities, and get introduced to a skill for your coding agent of choice that helps modernize your codebase.

Kyle Howells:

iOS 27’s UIKit is a tiny release in terms of API changes, but does have some changes. There are no new top-level paradigms, but there’s an new addition to TextKit 2, a new scene accessory API, Liquid-Glass-era bar minimization controls, and a small amount of quality-of-life additions to menus, tab bars, and drag interactions.

Hartley Charlton:

Apple appears to be laying the groundwork for a foldable iPhone in iOS 27, with new references discovered in the operating system’s frameworks and a notable emphasis on flexible app layouts at this year’s Platforms State of the Union.

Jordan Morgan:

The nav bar and its friends got quite a bit of attention, and to be honest that’s where we will find most of the changes. They adapt to all sorts of sizes and situations…hmmm, I WONDER WHY!?

[…]

A few years ago, I wondered if UIKit would be deprecated altogether. That would’ve been drastic, sure, but I did wonder. These days, I don’t share the same concern anymore. SwiftUI gets better each year, and yeah — it’ll have top billing. But UIKit is solid, and it appears to be a core part of Apple’s strategy into the future.

Not much changed this year, and not much was added that’s flashy. But, that’s true of iOS 27 in several ways.

Previously:

Golden Gate Menu Icons

9 June 2026 at 19:15

Wesley Hilliard:

macOS Tahoe threw an icon on every menu item, making them impossible to distinguish at a glance. macOS Golden Gate has rectified that design taboo with blessedly iconless menus.

Apple:

In macOS 27.0, menu bar and context menus present a reduced set of menu item images, similar to the behavior prior to macOS 26.0. By default, NSMenu hides all menu item symbol images — non-symbol images remain visible. For menu items created from a xib file, NSMenu also observes the value of the “macOS 26.0 only” checkbox in the menu item inspector. If this checkbox is unchecked, the menu item image remains visible; if checked, it is hidden. These changes in menu item image visibility apply to applications linked on macOS 26.0 and later. Review the updated Human Interface Guidelines to determine which menu items in your app should still display images. Use the new preferredImageVisibility property on NSMenuItem to customize the image visibility for your menu items. As in macOS 26.0, NSMenu automatically provides default visible menu item images for certain common system-wide menu items, such as Settings, Share, and Print.

Joachim Kurtz:

„Icons in menus are now hidden by default“ and you can specifically enable them to draw attention to the most important actions.

Don’t get me wrong, this is a great change! But to take a full year and your lead designer leaving to figure out that this was a mistake… woof…

Dominik Wagner:

I like that Menu Icons now are hidden by default again on macOS - Quite a lot of concessions towards liquid glass being the wrong move last year. Takes courage to take so many steps back, literally. I’m appreciating that. Even if they present it as improvements rather than “undo” - that’s just what one has to do for marketing.

Previously:

Update (2026-06-11): John Gruber (Mastodon, Hacker News, MacRumors):

Wonderful news in MacOS 27 Golden Gate: the icons are gone. It’s like Tahoe’s menu item icons never happened. Prokopov noted it on Mastodon with before and after screenshots, and mentions that Apple has updated the Human Interface Guidelines accordingly[…]

[…]

This is my favorite news from all of WWDC this week.

Marcin Wichary:

Kudos to Nielsen and Prokopov for pushing on this and explaining the problem so well. This wasn’t about ugly icons. This was about improper use and misunderstanding of iconography.

❌