Friday, October 2, 2020

macOS Big Sur Changes for Developers

Free Pascal (via Frank Reiff):

macOS 11 Big Sur introduces many user interface changes that update the appearance of applications and make them more iOS-like. It also adds support for familiar iOS features — such as SF Symbols and text styles.

[…]

By default, toolbars are taller, window titles can display inline with controls, and toolbar items no longer include a bezel.

I’ve found that in order to get the new title bar and the preferences toolbar style, you have to build using Xcode 12. It’s not enough to set NSWindow.toolbarStyle.

Even when using the new SDK, setting NSControlSizeLarge on the view doesn’t give you the new large icon style. To get that, you need to use NSToolbarItem.bordered, which requires macOS 10.15, instead of creating the view yourself. So that means separate toolbar implementations if you want to support macOS 10.14 and earlier. Because I’m no longer creating the view myself, I had to switch from NSSegmentedControl to NSToolbarItemGroup, but unfortunately NSMenuToolbarItem doesn’t work when inside of a group.

My main Mac is still on macOS 10.14, so I’m using #if __MAC_OS_X_VERSION_MAX_ALLOWED < 101600 to make the same code compile with both Xcode 11 and Xcode 12.

Previously:

Update (2020-11-30): Jeff Johnson:

This blog post describes a few things I found while “adapting” my AppKit apps for macOS 11 Big Sur.

7 Comments RSS · Twitter


Wow, so I'm not the only person who's still on 10.14, I'm also not sure how to make sure my mac apps stay compatible with Big Sur while I stay on 10.14. Hmm


@Joe I’ve been doing a lot of development and testing these days via Screen Sharing.


We should start a support group, "Developers on Mojave"!

I just use an external drive with partitions for multiple macOS versions.


anyone know how to keep the old toolbar look when building on Big Sur?


@bob NSWindowToolbarStyleExpanded


I have a bunch of similar toolbar bug reports in with Apple.

If you build with Xcode 12 under Catalina, it does not respect the toolbarStyle setting in the .xib - it only honours that if you build in Big Sur (WTF?), so you have to set it in code.

If you set it to Automatic, it doesn't retain the same look in Big Sur as in Catalina, so you have to actively set it to Expanded.

Also, the size of the icons in a toolbar in an NSPanel is weirdly small.

The whole thing is half baked.


> Also, the size of the icons in a toolbar in an NSPanel is weirdly small.

its not just weird, it is unacceptable.

does anyone know how to get the normal toolbar icon size back despite building with Xcode 12.2?

Leave a Comment