Sign in Join
Wiki copytemporary

macOS Monterey changes for developers: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11*(macOS only)*
22
33## New features
44
55Monterey (macOS 12) was released 25 October 2021.
66
77### AppKit
88
99- NSButtons no longer highlight using the accent color when clicked. Before using any subclass that performs custom drawing, inspect the button cell’s *interiorBackgroundStyle* property to determine if the bezel draws in a normal or emphasized state. (macOS 12)
1010
1111- NSButtons now support custom tinting with the *bezelColor* property. This property — previously applied only in the Touch Bar — now functions for all in-window buttons using the *NSButtonTypeMomentaryPushIn* style. (macOS 12)
1212
1313- NSSlider: When clicking on the track, for linear sliders, circular sliders, or dial, the slider now animates to the new value. You can now tint sliders with colorful track fills using the *trackFillColor* property. This property now functions for all in-window sliders. (macOS 12)
1414
1515- NSSegmentedControls controls now support custom tinting via the *selectedSegmentBezelColor* property. This property now functions for all in-window segmented control styles that draw colorful selected segments. (macOS 12)
1616
1717- NSPopover has a new animation when appearing and dismissing. (macOS 12)
1818
1919- SF Symbols now support layered symbol images. Layered symbol images use an updated data format to annotate each path element of the symbol with a level in a hierarchy: primary, secondary, tertiary, and so on. At draw time, AppKit can assign different colors to each layer of the symbol using new APIs on NSImage.SymbolConfiguration. Many system-provided symbol images redesigned to include layered versions. (macOS 12)
2020
2121- To enable secure coding for a restorable state, implement *applicationSupportsSecureRestorableState*. (macOS 12)
2222
2323- NSMenu: The new user preference *Automatically hide and show the menu bar in full screen* in Dock & Menu Bar preferences is enabled by default. In macOS Monterey 12, the user can choose to disable this setting to always show the menu bar in full screen spaces. Standard full screen windows are resized to fit below the menu bar. Some applications assume a full screen-sized window, and don’t work well with this setting. (macOS 12)
2424
2525- NSTableView 20-point spacing precedes each group row to make the separation between sections more visible. Source lists have a similar, but smaller, 13-point spacing. This applies to the *NSTableView.Style.inset* and *NSTableViewStyleFullWidth* effective styles in applications linked against the macOS 12 SDK. *NSTableView.Style.plain* doesn’t display the spacing. The floating group row transition — previously a push transition — instantly replaces the new floating group row. It occurs when the x-height of the group row’s label meets the bottom of a currently floating group row. (macOS 12)
2626
2727- NSOutlineView: The disclosure button now aligns with the cell view’s firstBaselineOffsetFromTop. The system overrides it in *NSTableCellView* so it matches the baseline of its textField (assuming textfield sets the baseline). Overriding the property and returning 0 reverts to the previous behaviour. When collapsing several items, the *NSOutlineViewSelectionDidChangeNotification* only posts once. Previously, it posted once per collapsed item. (macOS 12)
2828
2929- NSOpenPanel: Setting *canChooseFiles* to false automatically disabled files, but all of the directory contents were sent to *panel(_:shouldEnable:)* or *panel:shouldShowFilename:*. In macOS Monterey 12, files aren’t sent to the delegate methods unless *canChooseFiles* is true. In addition, file packages are excluded unless *treatsFilePackagesAsDirectoriesis* is true. This change allows optimization in the delegate method. (macOS 12)
3030
3131- TextKit 2 introduces a new text layout engine and its associated API. You can use TextKit 2 alongside the existing TextKit API. (macOS 12)
3232
3333### Mac Catalyst
3434
3535Users of iPad and iPhone apps running on a Mac with Apple silicon may enable or disable the Touch Alternatives feature via the application's preferences panel. The Touch Alternatives preference is automatically added to all iPad and iPhone apps when running on a Mac with Apple silicon. This feature makes it possible to use the keyboard to simulate swipes, taps, and drags, as well as device tilt; it also maps touches from the trackpad directly into the app when you hold down the Option key.
3636
3737Developers can automatically enable this feature for their app by default, by adding a properly configured `com.apple.uikit.inputalternatives.plist` to the application bundle. An onboarding dialog is shown on first launch in this case.
3838
39-`<?xml version="1.0" encoding="UTF-8"?>`\
40-`<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "`[`http://www.apple.com/DTDs/PropertyList-1.0.dtd`](http://www.apple.com/DTDs/PropertyList-1.0.dtd)`">`\
41-`<plist version="1.0">`\
42-`<dict>`\
43-`   <key>defaultEnablement</key>`\
44-`   <true/>`\
45-`   <key>version</key>`\
46-`   <real>1</real>`\
47-`   <key>requiredOnboarding</key>`\
48-`   <array> `\
49-`       <string>Tap</string>`\
50-`       <string>Arrow Swipe</string>`\
51-`       <string>Scroll Drag</string>`\
52-`       <string>Tilt</string>`\
53-`       <string>Trackpad Capture</string>`\
54-`   </array>`\
55-`</dict>`\
56-`</plist>`
39+```text
40+<?xml version="1.0" encoding="UTF-8"?>
41+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
42+<plist version="1.0">
43+<dict>
44+ <key>defaultEnablement</key>
45+ <true/>
46+ <key>version</key>
47+ <real>1</real>
48+ <key>requiredOnboarding</key>
49+ <array>
50+ <string>Tap</string>
51+ <string>Arrow Swipe</string>
52+ <string>Scroll Drag</string>
53+ <string>Tilt</string>
54+ <string>Trackpad Capture</string>
55+ </array>
56+</dict>
57+</plist>
58+```
5759
5860Tailor the requiredOnboarding array to onboard the Touch Alternatives that only make the most sense for your app. While only the subset of features specified in the array is visually presented to the user during onboarding, all Touch Alternatives are active when enabled in this manner. (macOS 12)
5961
6062### Networking
6163
6264- The default Accept-Language header that URLSession sends has an updated format and corrected values for multiple locales. In addition to the preferred language, the header also includes the current system language as a fallback if it differs from the preferred language. This behavior affects apps that link against macOS 12. (macOS 12)
6365
6466- URLSession now includes async functions. (macOS 12)
6567
6668### Privacy
6769
6870- With share current location, users can easily share their current location with an app just once, without giving the developer further access after that session. Developers can customize the share current location button, and integrate it directly into their apps. (macOS 12)
6971
7072- With enhanced Photos limited library access, developers can offer smart functionality — like a recent photos folder for specific albums — even when a user has only granted limited access. (macOS 12)
7173
7274- With secure paste, developers can let users paste from a different app without having access to what was copied until the user takes action to paste it into their app. When developers use secure paste, users will be able to paste without being alerted via the pasteboard transparency notification, helping give them peace of mind. (macOS 12)
7375
7476### Virtualisation
7577
7678- Interfaces that previously took unsigned long long arguments or returned unsigned long long results have been updated to use the uint64_t type instead. (macOS 12)
7779
7880## Deprecations
7981
8082- MKPinAnnotationView and MapPin are deprecated. (macOS 12)
8183
8284- Support for clear text HTTP URL schemes for Proxy Automatic Configuration (PAC) is now deprecated. Use only HTTPS URL schemes for PAC. This affects all PAC configurations including, but not limited to, configurations set via Settings, System Preferences, profiles, and URLSession APIs such as connectionProxyDictionary, and CFNetworkExecuteProxyAutoConfigurationURL(_:_:_:_:). If you configure a clear text HTTP PAC URL, the system may upgrade it to HTTPS during PAC file loads. Web Proxy Auto-Discovery (WPAD) Protocol via DNS isn’t affected. Dynamic Host Configuration Protocol (DHCP) Option 252 WPAD may attempt to upgrade clear text HTTP URLs to HTTPS during PAC file loads. (macOS 12)
8385
8486- If an application uses Python 2.7, macOS now triggers an alert indicating that the developer must update the app to ensure it will work in future versions of macOS. (macOS 12)
8587
8688- The output Combine publisher property for the message stream is deprecated. The PhotogrammetrySession.outputs property which uses the new Swift feature AsyncSequence replaces it. (macOS 12)
8789
8890- Fn (Function) shortcut modifier is deprecated and reserved for system usage. (macOS 12)
8991
9092- NSURLSession instance method streamTaskWithNetService is deprecated. (macOS 12)
9193
9294## Monterey Release Notes
9395
9496- [Apple: macOS Release Notes](https://developer.apple.com/documentation/macos-release-notes/).
9597- [Apple: AppKit Release Notes for macOS Monterey 12](https://developer.apple.com/documentation/macos-release-notes/appkit-release-notes-for-macos-12)
9698- [Apple WWDC 202:1 What's new in AppKit](https://www.wwdcnotes.com/notes/wwdc21/10054/)
9799
98100---
99101*From the Free Pascal wiki, page "macOS Monterey changes for developers", as it stood on 2021-12-20 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
100102Category: FPC
101103Category: Install
102104Category: Lazarus
103105Category: Platform-sensitive development
104106Category: macOS

Back to history