← 所有文章

macOS 27 發行說明:棄用項目、破壞性變更與修正

macOS 27 Golden Gate 已於2026年9月14日(星期一)以組建 26A428 正式推出,其 SDK(組建 26A425)也在同一天隨 Xcode 27(27A266a)一起發布。 Apple 為它撰寫的發行說明涵蓋 86 個有標題的分區、共 272 個條目:68 項新功能、173 個已解決的問題、18 個已知問題與 13 項棄用。本文從 Mac 開發者的角度解讀:哪些條目會在 App 連結 27 SDK 的當下改變行為、哪些系統層級的變更完全不必重新建置就會生效、13 項棄用對照 SDK 自身標頭檔與 Swift 介面的結果,以及我在一台仍執行 26.6.2 的 Mac 上能驗證與無法驗證的部分。Golden Gate 正式版文章已經談過 Rosetta 與安裝程式預設 arm64 的問題;本文處理其餘部分。123

重點摘要

  • 組建編號。 裝置 26A428、SDK 26A425;SDK 的編號並不是裝置的編號,錯誤回報要求提供版號時,這一點很重要。截至9月26日,Apple 的發行說明索引與 Releases 動態都沒有列出 macOS 27.0.1;最新的條目是 27 與9月21日的 27.2 beta 2(26B5091g)。137
  • 連結 27 SDK 後才生效的行為。 共有十三項變更會在 App 連結 27 SDK 的那一刻改變行為:非符號的選單項目圖像被隱藏,純圖像項目也失去例外;NSOpenPanel 改由內容類型推導 canChooseFiles;Layout Orientation 選單項目移到 Font 底下;標題列配件可以繪製到邊界之外;TextField 的提示文字接受樣式;可選取的 Text 支援 TextRenderer;sheet 與 popover 內的控制項修飾器被重設;containerRelativeFrame 的安全區域計算;LabeledContent 變成選單副標題;檢閱器中的 TabView 改用分頁樣式;List 接受過去會拒絕的拖放;newDocument 可接收記憶體中的文件;以及 Mac Catalyst 的場景生命週期強制要求與延伸的狀態還原。2
  • 不必重新建置也會生效。 凡是連結 macOS 26.0 以上的 App,選單項目的符號圖像都會消失,SwiftUI 與 UIKit 的選單更是完全沒有 SDK 條件;手勢辨識器只由第一個命中測試到的視圖階層獨佔,卡住的手勢會自行取消,基底的 locationInView: 回傳 NSZeroPoint,launchd 被列為不再載入帶有隔離屬性的屬性列表,直接存取 TCC 資料庫的做法走入歷史,跨團隊存取容器會在不提示的情況下遭拒,XProtect 可以隔離 App 資料,MDM 與軟體更新流量必須使用 TLS 1.2 及符合 ATS 的加密套件,而使用者設為「Open using Rosetta」的 App 會改以原生方式啟動。2
  • 13 項棄用,其中四項屬於 API。 PHAssetResource.originalFilename 只在部署目標為 27.0 時才會警告(標頭檔寫的是 macos(10.15, 27));FileDocument 帶有軟性的 100000.0 版本,永遠不會警告;calendar.deleteEvents 已從 App Intents 介面消失,舊名稱因此無法編譯;DVDPlayback 與說明所述相反,仍以 stub、標頭檔與模組的形式留在 27.0 SDK 中,部署下限低於 27.0 時會警告,等於 27.0 時則編譯失敗。其餘九項屬於系統行為、App、格式或 beta 遺留,而非 API。23
  • SDK 證實了新的 AppKit。 NSRefreshController、NSTextSelectionManager、搭配 NSToolbarItemGroup.Role 與 NSSegmentedControlRole 的 role 屬性、preferredImageVisibility、cancellableByScrollGesture,以及 NSApplicationPresentationDisableScreenCornerInteractions 選項,全都標註為 macos(27.0);DiskImageKit 與 NowPlaying 框架都在;System 有了 Stat 型別;StoreKit 有 assigned 與 BundledSubscription,而發行說明寫成 assignmentRevoked 的地方,介面裡是 assignmentRevocation。3

哪個組建編號是哪個?

位置 組建 證據
裝置,macOS 27.0 26A428 Releases 動態,Mon, Sep 14, 20261
Xcode 27(27A266a)內的 SDK 26A425 MacOSX27.0.sdk/System/Library/CoreServices/SystemVersion.plist,ProductBuildVersion3
macOS 27.2 beta 2 26B5091g Releases 動態,Mon, Sep 21, 20261
macOS 27.0.1 無 截至9月26日,Releases 動態與 macOS 發行說明索引中都沒有17
App Store Connect 接受 27.0 正式版 SDK 「You can now upload apps built with Xcode 27 using the SDK for iOS 27.0, iPadOS 27.0, macOS 27.0, tvOS 27.0, visionOS 27.0, and watchOS 27.0 for the App Store, and for internal and external testing through TestFlight.」(現在可以上傳以 Xcode 27 與各平台 27.0 SDK 建置的 App,用於 App Store 以及透過 TestFlight 的內部與外部測試。)9月14日6

發行說明開頭用兩句話交代範圍:「The macOS 27 SDK provides support to develop apps for Mac computers running macOS 27 Golden Gate. The SDK comes bundled with Xcode 27, available from the Mac App Store,」(macOS 27 SDK 用於開發在 macOS 27 Golden Gate 上執行的 Mac App,隨附於可從 Mac App Store 取得的 Xcode 27。)接著逐一列出 86 個有標題的分區。清點每個標題下的清單項目,得到 68 項新功能、173 個已解決的問題、18 個已知問題與 13 項棄用。Siri 佔了 26 個已解決與六個已知,SwiftUI 佔 21 項新功能與 19 個已解決,AppKit 佔八項新功能與 18 個已解決,Core AI 佔 11 個已解決,StoreKit Testing in Xcode 則有 10 個已解決與兩個已知。2 iOS 27 發行說明文章處理 iPhone 這一側,同樣的 SwiftUI 條目在那裡以 iOS 的措辭出現;Xcode 27 文章則涵蓋工具鏈。

9月21日的 27.2 beta 2 發行說明很短:一項 Xcode 程式碼補全當機列為已修正、一項 AppKit 棄用(「The EnablePasteboardPrivacyDeveloperPreview user default has been removed.」,即該 user default 已移除)、一則乾淨安裝後的 Notifications 已知問題、一則 Shortcuts 已知問題、下文提到的兩則 StoreKit Testing 已知問題轉為已修正,另外還有一項新的 StoreKit Testing 修正,涉及 SKTestSession.clearTransactions() 之後的首購優惠資格。除了這些 StoreKit Testing 條目之外,其中沒有任何內容觸及本文的 27.0 條目。4

連結 macOS 27 SDK 的那一刻會改變什麼?

Apple 以 App 所連結的 SDK 作為行為變更的閘門,因此這些變更對您已經出貨的組建毫無影響,而從 Xcode 27 產生第一個封存檔時就會全部生效。以下逐項引用原文:2

  • 非符號的選單項目圖像,以及空標題的例外。 下文談到的符號圖像變更不需要重新建置;其餘部分則由重新建置帶來。「For applications linked on the macOS 27 SDK, both symbol and non-symbol menu item images are now automatically hidden. For applications linked on earlier SDKs, non-symbol images remain automatically visible, preserving compatibility with existing application behavior.」(連結 macOS 27 SDK 的 App,符號與非符號的選單項目圖像都會自動隱藏;連結較早 SDK 的 App,非符號圖像仍會顯示。)舊組建則反過來:「For applications linked on SDKs prior to macOS 27, NSMenu now automatically shows menu item images if the menu item title and attributed title are both empty. This preserves existing application behavior when the image is the only representation of the menu item content. When linking against the macOS 27 SDK, these images will automatically be hidden.」(連結 macOS 27 以前 SDK 的 App,若標題與 attributed title 皆為空,NSMenu 會顯示圖像;改連結 macOS 27 SDK 後,這些圖像也會被隱藏。)純圖像的項目在重新建置後,需要把 preferredImageVisibility 設為 .visible。我的選單圖像文章逐步說明如何檢查。
  • 開啟面板自行推導可選項目。 列為已修正:「In apps built with the macOS 27.0 SDK, setting allowedContentTypes and treatsFilePackagesAsDirectories on NSOpenPane updates canChooseFiles and canChooseDirectories based on whether the requested types are file or directory types.」(設定這兩個屬性時,會依要求的類型是檔案還是目錄,更新 canChooseFiles 與 canChooseDirectories。)(說明把類別名稱拼錯了。)一個設定了內容類型、又仰賴明確寫出 canChooseDirectories = true 的開啟面板,就是需要重新測試的典型寫法。
  • Layout Orientation 搬家。 「NSTextView’s menuForEvent: now returns a context menu in which the Layout Orientation menu item, and its submenu, are located inside the Font submenu. Because this change can cause compatibility issues with some shipping applications, it applies only to applications linked on the macOS 27 SDK.」(Layout Orientation 項目及其子選單移到 Font 子選單內;由於可能造成相容性問題,只套用於連結 macOS 27 SDK 的 App。)靠走訪選單來找這個項目的程式碼,會在重新建置後失效。
  • 標題列配件溢出邊界。 「When an app is linked on macOS 27.0 or later, NSTitlebarAccessoryViewController is now allowed to draw outside its bounds by default, supporting effects such as shadows and interactive glass effects. During reveal animations, accessories might be clipped for the duration of the animation or when the accessory is hidden.」(預設允許繪製到邊界之外,以支援陰影與互動式玻璃效果;顯示動畫期間配件可能被裁切。)
  • TextField 的提示文字接受樣式。 「In apps built with the macOS 27.0 SDK, TextField respects custom font and color styling applied to its prompt. Apply styling to the Text provided to TextField’s prompt parameter at initialization.」(TextField 會套用提示文字的自訂字型與顏色;樣式應加在初始化時傳給 prompt 參數的 Text 上。)
  • 可選取的 Text 支援 TextRenderer。 「In apps built with the iOS 27.0 and macOS 27.0 SDKs, selectable Text views now support TextRenderer,」旁邊那則已修正的條目也說,自訂渲染器「now takes effect on a Text view that also has .textSelection(.enabled) applied.」(現在對同時套用 .textSelection(.enabled) 的 Text 視圖也會生效。)
  • Sheet 與 popover。 列為已修正:「In apps built with the 27.0 SDKs, the controlSize, buttonSizing, buttonRepeatBehavior, menuIndicatorVisibility, and ButtonBorderShape environment values are now reset to their default values in sheets and popovers.」(這些環境值在 sheet 與 popover 中會重設為預設值。)原本從呈現者繼承 .controlSize(.large) 的 sheet,將不再繼承。
  • containerRelativeFrame。 對 27.0 組建列為已修正:它「incorrectly accounts for safe-area insets on a ScrollView’s non-scrollable axis, causing the calculated scrollable content size to be too small.」(在 ScrollView 的非捲動軸上錯誤計入安全區域內距,導致算出的可捲動內容尺寸過小。)這則條目的方向並不明確,因為它的範例描述的是內容延伸進安全區域,而不是縮小;重新建置後,請重新測試所有位於 ScrollView 內的 containerRelativeFrame。
  • 選單多了副標題。 「In apps built with the 27.0 SDKs, a LabeledContent view used inside a Menu maps its value to the platform menu item’s subtitle.」(Menu 內的 LabeledContent 會把值對應到選單項目的副標題。)
  • 檢閱器中的 TabView。 「In apps built with the latest SDKs, the appearance of TabViews in inspectors now matches their appearance in sidebars, and in both contexts automatically uses the new .tabs picker style.」(檢閱器中的 TabViews 外觀改與側邊欄一致,兩處都會自動採用新的 .tabs 選擇器樣式。)
  • List 接受更多拖放。 「In macOS apps built with the macOS 27 SDK, List accepts drops in two cases that previously didn’t work: drags with compatible transfer representations are accepted into reorderable content even when the .reorderableItem transfer type isn’t present, and a .dropDestination(...) modifier declared on a list item now performs the drop.」(List 在兩種過去無效的情況下接受拖放:即使沒有 .reorderableItem,相容的傳輸表示也能放進可重新排序的內容;宣告在列表項目上的 .dropDestination(...) 也會真的執行拖放。)在 Mac 上從未觸發過的拖放處理常式,可能開始被觸發。
  • newDocument 接收實例。 「In macOS apps built with the macOS 27 SDK, the action retrieved from the \.newDocument environment value accepts an in-memory ReadableDocument produced by an autoclosure. SwiftUI presents a new document window populated with the supplied instance, instead of invoking the document group’s default factory.」(這個動作可接收由 autoclosure 產生、存在記憶體中的 ReadableDocument,SwiftUI 會用該實例開啟新的文件視窗,而不呼叫文件群組的預設工廠。)
  • Mac Catalyst。 在 UIKit 的棄用項目下:「Apps built with the latest SDK must adopt the scene-based life cycle or they fail to launch,」(以最新 SDK 建置的 App 必須採用場景式生命週期,否則無法啟動。)這與場景強制要求文章針對 iOS 談的是同一項規定;另外,「When linked on iOS 27, tvOS 27, macCatalyst 27, or visionOS 27 SDKs, you can use UIScene.extendStateRestoration and UIScene.completeStateRestoration to extend state restoration」,把狀態還原延伸到從背景切回前景的過程。另有一則不受 SDK 閘門限制的條目:「Catalyst apps now behave like AppKit apps when you switch to them with no open windows」(在沒有開啟視窗時切換到 Catalyst App,行為會與 AppKit App 相同);除非從 Dock 或 Spotlight 啟用,否則它們不再自動建立視窗。

另有兩則條目,一則在 SwiftUI 下、一則在 Swift Charts 下,雖然取決於編譯器而非連結,也屬於這一節。@State 巨集的改寫「back-deploys to iOS 17 aligned OSes」(向下部署到與 iOS 17 對齊的各作業系統),並改變了 Xcode 27 下能編譯的內容:某些同時帶有初始值、又在 init 中賦值的宣告不再能編譯,用 Apple 的話說是「some such cases」(部分這類情況),而且合成的私有初始化器會消失。@State 巨集文章有完整的檢查方式。Swift Charts 那則條目列為已修正,描述的是一則警告與可能的執行期當機:「When your project has a minimum deployment target lower than 27.0, using conditionals inside a Chart closure produces the warning」,內容與 _ConditionalContent 的一致性有關,「and the app might crash at runtime when that content is loaded.」(部署目標低於 27.0 時,在 Chart 閉包中使用條件式會產生警告,載入該內容時 App 可能當機。)引用的警告裡平台名稱是空的,看起來像是 beta 時期的診斷訊息,而我無法重現:9月26日,一個以 if 在 BarMark 與 LineMark 之間分支的 Chart 閉包,對 27.0 SDK 做型別檢查時,無論部署目標是 26.0 還是 27.0,都沒有任何診斷。條目中關於執行期當機的那一半是 Apple 的文字,本文並未測試。23

完全不必重新建置就會改變什麼?

發行說明的另一半描述的是作業系統本身,這些變更會套用到您去年出貨的二進位檔。2

  • 選單的符號圖像消失。 AppKit:「By default, NSMenu hides all menu item symbol images」(預設情況下,NSMenu 會隱藏所有選單項目的符號圖像),而且這項變更適用於「to applications linked on macOS 26.0 and later」(連結 macOS 26.0 以上的 App),所以從 Xcode 26 建置的組建在 27 的機器上,不必重新建置就會失去符號圖像;NSMenuItem 上的 preferredImageVisibility(API_AVAILABLE(macos(27.0)))可以覆寫這個行為,xib 檢閱器中的「macOS 26.0 only」勾選框則是第二個開關。SwiftUI:「By default, SwiftUI now hides all menu item symbol images in most contexts, while non-symbol images remain visible,」(SwiftUI 在多數情境下會隱藏選單項目的符號圖像,非符號圖像仍會顯示。)想保留圖像可使用 labelStyle(_:) 搭配 .titleAndIcon,條目中也沒有任何 SDK 條件。UIKit:「On iPadOS 27.0 and macOS 27.0, the menu bar and context menus present a reduced set of menu item images and do not display images set on menu elements by default,」(選單列與內容選單顯示的圖像變少,預設也不顯示設定在選單元素上的圖像。)對應的開關是 UIMenuElement 上的 preferredImageVisibility,同樣沒有 SDK 條件。標頭檔也支持這是系統層級行為的解讀:NSMenuItem.image 的註解寫道「in macOS 27 and later, AppKit determines the visibility of menu item images, and will typically hide images.」(從 macOS 27 起,由 AppKit 決定選單圖像是否顯示,通常會隱藏。)3
  • 手勢改為獨佔。 「Only the initial hit-tested view hierarchy will activate gesture recognizers until all gestures terminate. A new exclusiveGestureBehavior property on NSView allows you to opt-out of this exclusive behavior on a per-view-hierarchy basis. Further, the Info.plist key NSViewGestureRecognizerIsExclusive allows you to opt-out for the entire app.」(在所有手勢結束之前,只有最先被命中測試到的視圖階層會啟用手勢辨識器;exclusiveGestureBehavior 可逐一視圖階層退出,Info.plist 鍵則可讓整個 App 退出。)另一個搭配的鍵 NSGestureRecognizerSuppressesMainMenuActions 讓主選單動作在手勢進行中也能觸發,而且「stuck gestures are automatically cancelled after user input has ended for a few seconds,」(使用者輸入結束數秒後,卡住的手勢會自動取消。)NSCrashOnStuckGestureTimeout 預設值則可在除錯時把這種情況變成當機。父視圖上原本會與子視圖一起觸發的辨識器,現在得等待。
  • 自訂辨識器必須自行定位。 列為已修正:NSGestureRecognizer 的基底 locationInView:「now returns NSZeroPoint and logs an error pointing the developer at the missing override. Custom NSGestureRecognizer subclasses must provide their own locationInView: implementation.」(現在回傳 NSZeroPoint,並記錄一則指出缺少覆寫的錯誤;自訂子類別必須自行實作 locationInView:。)另一則條目把診斷用的 NSGestureRecognizerCrashOnMissingOverrides 預設值描述為「to help developers find NSGestureRecognizer subclasses that are missing required overrides to ensure that they always reach a terminal state」(協助找出缺少必要覆寫、因而無法確保抵達終止狀態的子類別);它是否也會攔下缺少 locationInView: 的情況,發行說明並沒有說。此外,NSClickGestureRecognizers「with a click count greater than 1 will send an action before their multi-click timeout has elapsed.」(點按次數大於 1 時,會在多重點按逾時之前就送出動作。)
  • launchd 與隔離屬性。 列為已修正:「launchd no longer supports loading launchd property list files with the quarantine extended attribute.」(launchd 不再載入帶有隔離延伸屬性的屬性列表檔案。)Apple 的已修正條目有時描述舊的錯誤,有時描述新的規則;若當成規則來讀,一個下載後連同該屬性一起安裝的 agent plist 將不再被載入。
  • TCC。 在 Deprecations 下:「Apps can no longer access the local TCC database directly.」(App 不能再直接存取本機的 TCC 資料庫。)
  • 容器與 XProtect。 在 System Integrity Protection 下:「Accessing files in other developer teams’ app data containers and app group containers no longer prompts the user for authorization; such accesses are denied by default and can be managed by the user in Privacy & Security settings.」(存取其他開發團隊的容器不再詢問使用者,而是預設拒絕,使用者可在 Privacy & Security 中管理。)還有:「XProtect may now restrict access to app data that is commonly targeted by malicious software.」(XProtect 可能限制存取惡意軟體常鎖定的 App 資料。)Privacy & Security 的已知問題補充說,「a process without a bundle ID cannot be granted access to specific app data containers or app group containers owned by other developer teams,」(沒有 bundle ID 的行程無法獲准存取其他團隊的特定容器。)退路則是 Full Disk Access。
  • 受管理流量的 TLS。 「Starting in 27.0 operating systems, select system processes now enforce stricter network security (TLS) requirements,」(從 27.0 各作業系統起,部分系統行程會強制較嚴格的 TLS 要求。)點名的有 MDM、DDM、Automated Device Enrollment、描述檔安裝、App 安裝與軟體更新;「Servers must support TLS 1.2 at minimum, using cipher suites and certificates that meet App Transport Security (ATS) requirements.」(伺服器至少須支援 TLS 1.2,並使用符合 ATS 要求的加密套件與憑證。)TLS 稽核文章有檢查清單。
  • Rosetta。 「On launch, Applications previously set to “Open using Rosetta” by a user will have the application launch natively,」(使用者設為「Open using Rosetta」的 App 會改以原生方式啟動)「If Rosetta was previously installed, it is not automatically restored after upgrading to macOS 27.0,」(先前安裝的 Rosetta 在升級後不會自動恢復)而未指定 hostArchitecture 的安裝套件「will now default to arm64.」(現在預設為 arm64。)正式版文章在 26.6.2 上重現了這個安裝程式預設值。
  • 背景中的 Neural Engine。 這則條目位於 macOS 頁面,開頭卻是「iOS 27 includes Neural Engine improvements for Apple Intelligence capable devices」,因此請把它當成跨平台共通的說明來讀:「The system now restricts background access to the Neural Engine, similar to GPU usage restrictions,」(系統會限制背景存取 Neural Engine,類似 GPU 的使用限制)以及「Neural Engine memory usage is now attributed to your app process instead of the system, and appears in the Allocations instrument.」(Neural Engine 的記憶體用量改算在您的 App 行程上,並會出現在 Allocations 工具中。)另一則 Core AI 條目說,背景存取「requires the new entitlement: “com.apple.developer.background-tasks.continued-processing.inference”.」(需要這項新的 entitlement。)
  • 日誌封存檔。 「Unified Logging System archives generated on 27.0 releases cannot be read on macOS 26.1 or earlier due to an updated archive format. macOS 26.2 or later is required to read these archives.」(由於封存格式更新,27.0 產生的封存檔須在 macOS 26.2 以上才能讀取。)在較舊的 Mac 上開啟客戶 .logarchive 套件的支援流程,至少需要 26.2。
  • 檔案承諾改用斷言。 列為已修正:receivePromisedFilesAtDestination:「asserts that it is called during -prepareForDragOperation:, -performDragOperation:, or -concludeDragOperation:. If receivePromisedFilesAtDestination:... is called at other times, your application will throw an exception and terminate.」(會斷言自己是在這三個拖曳方法期間被呼叫;在其他時間呼叫,App 會拋出例外並終止。)把呼叫延後到之後某個 run loop 週期的接收端,現在會直接終止。

27.0 棄用了哪些 API?

發行說明在 11 個分區的 Deprecations 標題下共列出 13 個條目。發行說明中的棄用是一句話;SDK 中的棄用則是編譯器會讀取的可用性標註,兩者說的未必相同。我將每個條目與 Xcode 27 內 macOS 27.0 SDK 的標頭檔及 Swift 介面逐一對照:23

發行說明條目 SDK 的說法
「The originalFilename property on PHAssetResource is incorrectly marked as non-nullable, which misrepresents the property value; a new, nullable filename property is available as a replacement.」(誤標為 non-nullable;改用新的、可為 nil 的 filename 屬性。) PHAssetResource.h 中的 API_DEPRECATED("Use filename instead", ios(9, 27), macos(10.15, 27), tvos(10, 27), visionos(1, 27))
「The FileDocument protocol is deprecated. Use ReadableDocument for read-only documents or Document for documents that support reading and writing.」(已棄用;唯讀文件改用 ReadableDocument,可讀寫文件改用 Document。) FileDocument 上的 @available(macOS, introduced: 11.0, deprecated: 100000.0, message: "Conform your type to Document instead."):軟性棄用,目前不會警告。ReadableDocument、WritableDocument 與 Document 都在介面中
「The calendar.deleteEvents schema has been renamed to calendar.deleteEvent.」(已改名。) deleteEvents 在 macOS 的 AppIntents 介面中出現零次,deleteEvent 出現一次。沒有別名的改名,對仍使用舊名稱的人而言就是編譯錯誤
「The DVDPlayback framework has been removed from the macOS 27 Golden Gate SDK and apps cannot build against it. The framework will be removed in a future macOS release.」(已從 SDK 移除,App 無法再針對它建置;框架本身將在未來版本移除。) 磁碟上的 SDK 並未移除它:MacOSX27.0.sdk/System/Library/Frameworks/DVDPlayback.framework 內含一個 .tbd,為 x86_64-macos、arm64e-macos 與 arm64e.x1-macos 三個目標匯出 223 個不同的 _DVD 符號,還有 Headers 資料夾與 module map。部署目標為 26.0 時,import DVDPlayback 可通過型別檢查,DVDInitialize() 會出現「deprecated in macOS 10.15」警告;部署目標為 27.0 時,同一個呼叫會成為錯誤「unavailable in macOS: No longer supported」。所以「cannot build against it」是在 27.0 下限時透過可用性標註成立,而 stub 仍然存在
「Encrypted HFS+ (CoreStorage) is deprecated and will not be supported in a future version of macOS.」(已棄用,未來版本將不再支援。) 這是檔案系統格式,不是 API;請改備份到加密的 APFS
「Apps can no longer access the local TCC database directly.」 不是標註,而是由作業系統強制執行的政策
「Apps built with the latest SDK must adopt the scene-based life cycle or they fail to launch.」(UIKit,因此也包括 Mac Catalyst) 是啟動失敗,不是警告
「If Rosetta was previously installed, it is not automatically restored after upgrading to macOS 27.0.」 作業系統行為
「Installer packages which specify no hostArchitecture will now default to arm64.」 作業系統行為;已在正式版文章中於 26.6.2 上重現
「Intel-based plugins and loaders may not appear in Settings or trigger notifications of their incompatibility. All Intel-based software will no longer be compatible with macOS 28.0, excluding legacy games.」(Intel 外掛可能不會出現在設定中;除舊遊戲外,所有 Intel 軟體都將與 macOS 28.0 不相容。) 作業系統行為;Apple 列出的外掛資料夾是 ~/Library/Audio/Plug-Ins/*、~/Library/Printers/ 與 ~/Library/ColorPickers/
「AirPort Utility is no longer included with new clean installations of macOS.」 是 App,不是 API
「Meshes compressed using the USDKit export API or usdcrush tool in Beta 1 cannot be decoded by Beta 2, and meshes from Beta 2 cannot be decoded by Beta 1.」(Beta 1 與 Beta 2 之間無法互相解碼。) 一則 beta 之間的說明,一路留到了正式版頁面
「Weather Highlights is currently only available in US English.」 Apple 把它歸在 Deprecations 下;讀起來比較像可用性說明

有一項軟性棄用位於 Deprecations 標題之外,與 iOS 發行說明中的同一項:.roundedBorder 在 macOS 上是 deprecated: 100000.0,訊息為「Use textFieldStyle(.bordered) with textInputBorderShape(.roundedRectangle)」,與引入 TextInputBorderShape 的新功能條目相呼應。3

硬性棄用其實比表面上安靜。編譯器拿棄用版本比對的是您的部署目標,而不是 SDK,所以 macos(10.15, 27) 只會在最低 macOS 為 27.0 的目標中產生警告。我把一個讀取 originalFilename、讓型別遵循 FileDocument、並套用 .roundedBorder 的檔案,對 27.0 SDK 在兩個目標下做型別檢查:在 arm64-apple-macos26.0 下完全沒有診斷,在 arm64-apple-macos27.0 下恰好出現一則:'originalFilename' was deprecated in macOS 27: Use filename instead。FileDocument 與 .roundedBorder 在兩個目標下都毫無聲息。3 部署下限合理的 Mac App,不會從編譯器那裡聽到任何一項;下方清單中的 grep 就是您的通知。

哪些新功能會改變您已經寫好的程式碼?

Mac 上的下拉重新整理。 「In macOS 27.0, AppKit adds NSRefreshController, providing pull-to-refresh functionality for NSScrollView. You can set it with NSScrollView.refreshController, configure a target or action to handle user-initiated refreshes, and call endRefreshing when the refresh completes or beginRefreshing to start one programmatically.」(AppKit 為 NSScrollView 加入下拉重新整理,透過 refreshController 設定,以 target 或 action 處理使用者觸發的重新整理,再呼叫 endRefreshing 或 beginRefreshing。)這個類別與 NSScrollView 上的 refreshController 屬性,在 SDK 中都是 API_AVAILABLE(macos(27.0))。23

以手勢選取文字。 「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」(常見的文字選取互動改由一組手勢辨識器提供,而不是覆寫滑鼠方法,NSTextView 現在也使用它。)以及「Existing NSTextView subclasses that override mouseDown: continue to work through a binary-compatible fallback path.」(覆寫 mouseDown: 的既有子類別,會透過二進位相容的後備路徑繼續運作。)這個類別是 macos(27.0)。23 再加上前面的獨佔規則,結果就是:覆寫 mouseDown: 的自訂文字視圖仍能運作,但您另外掛在旁邊的手勢辨識器,現在可能要讓位給管理器的辨識器。

分頁的角色。 NSToolbarItemGroup 與 NSSegmentedControl 新增 role 屬性,兩者都是 API_AVAILABLE(macos(27.0)),搭配 NSToolbarItemGroup.Role(automatic、tabs、valueSelection)與 NSSegmentedControlRole;發行說明表示,tabs 角色會「read by VoiceOver as “tabs”」(被 VoiceOver 讀作「tabs」),並具有「a distinct visual appearance.」(獨特的視覺外觀。)SwiftUI 的 TabsPickerStyle 是同樣的概念,檢閱器在重新建置後會自動採用。23

關閉熱點。 「NSApplication.presentationOptions now includes the .disableScreenCornerInteractions option, which you can use to disable Hot Corners.」(新增可停用 Hot Corners 的選項。)在標頭檔中它叫 NSApplicationPresentationDisableScreenCornerInteractions,API_AVAILABLE(macos(27.0)),位於選項遮罩的第 15 位元,上方的註解寫著「.autoHideDock or .hideDock must also be set for this option to take effect.」(必須同時設定 .autoHideDock 或 .hideDock,此選項才會生效。)23

文件模型重寫。 「In apps built with the 27.0 SDKs, the new ReadableDocument and WritableDocument protocols support asynchronous reading and writing, progress reporting, and direct access to document URLs,」(新協定支援非同步讀寫、進度回報,以及直接存取文件 URL。)Document 結合了兩者,FileDocument 與 ReferenceFileDocument 則「now deprecated」(現已棄用)。三則後續條目會改動既有的協定遵循:FileWrapperDocumentWriter 的 makeFileWrapper 閉包「now receives a second argument, previous: FileWrapper?,」(現在會收到第二個引數)而且「Existing call sites must update their closures to accept the new parameter」(既有的呼叫處必須更新閉包以接收新參數);read(from:progress:) 與 write(content:to:previous:progress:) 這兩項要求「declared with @concurrent instead of nonisolated,」因此「Conforming types that previously used nonisolated should switch to @concurrent to match」(原本使用 nonisolated 的遵循型別應改用 @concurrent);另外,URLDocumentConfiguration「no longer conforms to Sendable.」(不再遵循 Sendable。)新的 fileExporter 多載可以在單一對話框中匯出一組 WritableDocument 值。同一分區的已知問題:進度「might not be presented.」(可能不會顯示。)2

圖像、邊框、滑桿、選單。 「AsyncImage now automatically caches downloaded images using HTTP caching protocols,」(AsyncImage 現在會依 HTTP 快取協定自動快取下載的圖像。)可用 URLRequest 初始化器與 View.asyncImageURLSession(_:) 調整。TextInputBorderShape 與 textInputBorderShape(_:) 隨 .bordered 樣式一起推出。「On macOS, the Slider implementation no longer uses NSSlider,」(macOS 上的 Slider 不再使用 NSSlider。)有邊框的 Menu 與 Picker 按鈕也「no longer use NSPopUpButton in their implementation,」(實作中不再使用 NSPopUpButton。)因此假設底下是 AppKit 控制項的自訂繪製或輔助使用程式碼,會什麼也找不到。GeometryProxy 新增 concentricCornerRadii 與 concentricCornerRadii(in:)。帶資料項目的 alert 與 confirmationDialog 修飾器,現在可回溯到 macOS 12.0。2

StoreKit。 「Offer code redemption APIs now return a VerificationResult when redemption completes,」(優惠代碼兌換 API 完成時會回傳 VerificationResult。)Transaction.OwnershipType.assigned 與 Transaction.RevocationType.assignmentRevoked「support volume purchases,」(支援大量購買。)而且「Transaction query methods now additionally return transactions assigned to the Managed Apple Account.」(查詢方法還會回傳指派給受管理 Apple 帳號的交易。)Product.ProductType 新增訂閱 Bundle 與 Suite,搭配 Product.SubscriptionInfo.BundledSubscription,partnerName 與 partnerId 則加入 Advanced Commerce 資訊。介面中有 assigned 與 BundledSubscription;撤銷那一項的拼法卻與說明不同。SDK 中沒有任何檔案含有 assignmentRevoked;StoreKit 介面在 Transaction.RevocationType 上宣告的是 public static var assignmentRevocation,原始值為 ASSIGNMENT_REVOKE。這一項標為 @available(macOS 26.4, *) 並帶 @backDeployed(before: macOS 27.0),所以 .assignmentRevocation 在 27.0 目標下可通過型別檢查,低於該下限時則需要 if #available(macOS 26.4, *);說明中的名稱在任何目標下都找不到對應的成員。依擁有權類型篩選交易的 Mac App,現在會看到第三個值。23

Swift 中的 stat。 「System now provides Swift APIs for the C stat, lstat, fstat, and fstatat system calls,」(System 現在為這幾個 C 系統呼叫提供 Swift API。)包含 Stat 型別與 FilePath.stat();發行說明也把一個衝突列為已修正:「Custom FilePath or FileDescriptor extensions that make unqualified calls to stat() or stat(_) (without the Darwin. qualification) might conflict with the new Swift stat() instance methods.」(未加限定就呼叫 stat() 的自訂擴充,可能與新的實例方法衝突。)public struct Stat 就在 System 介面中。23

磁碟映像、虛擬機器、Gatekeeper。 「The new DiskImageKit framework provides Swift APIs for creating and managing standalone and stacked disk images in the Apple Sparse Image Format (ASIF) and raw disk image formats, for use with the Virtualization framework via VZDiskImageStorageDeviceAttachment.」(新框架提供 Swift API,可建立與管理 ASIF 與原始格式的獨立或堆疊磁碟映像,供 Virtualization 框架使用。)這個框架在 SDK 中。Virtualization 的 vmnet 連接埠轉送「now support[s] port forwarding when communicating over loopback,」(現在也支援經由 loopback 轉送。)spctl 則新增 purge 指令,「which will clean up Gatekeeper database entries for apps and executables which are no longer mounted.」(用來清除已不再掛載之 App 與執行檔的 Gatekeeper 資料庫項目。)對於以指令碼操作虛擬機器的人,容器文章是這些磁碟映像 API 的落腳處。23

遊戲控制器、影像、Metal。 「The PlayStation® Access™ controller is now supported on macOS, iPadOS, and iOS.」(現已支援。)VTLowLatencySuperResolutionScalerConfiguration「now supports a 1.5x scale factor,」(現在支援 1.5 倍縮放。)而影格插補「supports arbitrary source dimensions up to 1080p.」(支援最高 1080p 的任意來源尺寸。)兩項 Metal 修正涉及 clamp-to-edge 取樣器回傳零的問題,其中一項專屬於「the Apple 10 GPU family.」2

Foundation。 NSURL 的修正在這裡以與 iOS 發行說明相同的措辭出現:「+[NSURL URLWithString:] no longer double-encodes the % of valid percent-escape sequences when encoding other invalid characters.」(不再重複編碼合法跳脫序列中的 %。)我在 iOS 文章中證明過,這項修正跟著程式碼執行的作業系統走,同一段程式碼的 Mac 版建置在 macOS 26.6.2 上仍產生舊的 %2520 結果;在 27.0 上應會看到新結果,在所有 26.x 上則是舊結果。2

硬體安全。 「arm64e.x1 introduces additional hardware security and performance instructions, including CPA2 for stronger MIE protection,」(新增硬體安全與效能指令,包括強化 MIE 防護的 CPA2。)適用於「Mac computers with M6 or later chips」(搭載 M6 或更新晶片的 Mac);前面 DVDPlayback stub 的目標清單,就讓這個 slice 名稱實際現身。arm64e.x1 文章說明了對應的建置設定。23

需要預先規劃的已知問題

  • photos.asset 實體無法編譯。 「Existing entities that conformed to @AppEntity(schema: .photos.asset) in prior releases might no longer compile in the 27 SDKs because new properties were added to the schema in this release.」(由於此版本在 schema 中新增了屬性,先前遵循它的實體在 27 SDK 下可能無法編譯。)因應做法是在可用性檢查之後採用這些屬性;iOS 發行說明文章列出了中繼資料處理器要求的 12 個屬性,而 macOS 發行說明也有同一則條目。2
  • 音訊 schema 與 Siri。 「If you adopt the Audio App Schema domain, you might have trouble playing your content using Siri.」(採用 Audio App Schema 網域後,可能無法透過 Siri 順利播放內容。)因應做法:「Adopt an IntentValueQuery that takes the AudioSearch input, or index your entities in Spotlight.」(採用接收 AudioSearch 輸入的 IntentValueQuery,或把實體編入 Spotlight 索引。)2
  • SpotlightSearchTool 撐爆裝置端模型。 不加設定時,「the tool’s description and parameter schema alone exceed the on-device model’s context window before any prompt is added」(光是工具描述與參數 schema,在加入任何提示之前就已超出裝置端模型的上下文視窗);解法是使用聚焦的指引,例如 .focused(.documents)。2
  • 無 bundle 行程的 Files & Folders。 沒有 bundle ID 的行程「cannot be granted access to specific app data containers or app group containers owned by other developer teams,」Apple 的因應做法是「for the duration of the requirement」(在需要的期間)授予 Full Disk Access。讀取其他 App 容器的命令列工具就是這種情況。2
  • 未簽署的 Safari 延伸功能。 開發期間,「unsigned extensions might not appear until rebuilt when using the “Allow Unsigned Extensions” checkbox.」(勾選該選項時,未簽署的延伸功能可能要重新建置後才會出現。)2
  • StoreKit 測試。 「Changing the storefront or locale using SKTestSession doesn’t propagate through Storefront.updates,」(透過 SKTestSession 變更店面或語系,不會傳遞到 Storefront.updates。)而失敗的購買「might display error dialogs even when dialogsDisabled is set to true.」(即使 dialogsDisabled 設為 true,仍可能顯示錯誤對話框。)兩者在 27.2 beta 2 發行說明中都列為已修正,而那份說明又新增一則:購買 bundle 內的訂閱時,「incorrectly allows the user to unbundle instead of throwing an error.」(錯誤地允許使用者拆開 bundle,而不是拋出錯誤。)24
  • Shortcuts。 使用 Duration 或 LPLinkMetadata 的 intent 在「Describe a change」下「might fail」(可能失敗),而具有兩種數字型別的 UnionValue 參數會把選項顯示兩次;請只宣告其中一種。2
  • 從 macOS 11 選擇啟動磁碟。 「When a Mac is running macOS 11.0, you might not be able to select the boot volume of macOS 27.0 or later as the startup disk in System Settings.」(在 macOS 11.0 上,可能無法於 System Settings 中把 macOS 27.0 的開機卷宗選為啟動磁碟。)因應做法是使用電源按鈕的啟動選擇器。2
  • Siri,六則。 搜尋後的照片選取、在 Siri 已關閉之處出現「Ask Siri」、無法以語音指令指定特定照片、不完整的地圖摘要、加入相簿的計數,以及第三方 App 的非 SF Symbol 實體圖像不會出現在 Siri 結果中。如果您的實體帶有自訂圖像,最後一則值得檢查。2

我無法執行的部分

這台 Mac 執行的是 macOS 26.6.2,而我手上仍然沒有 27 的機器。本文中每一項作業系統層級的行為都是 Apple 的文字,皆已引用並標明;上文沒有任何一處是因為我親眼看到,才說 macOS 27 系統做了某件事。我能執行的是 SDK:Xcode 27(27A266a)可在任何能安裝它的 Mac 上提供 macOS 27.0 SDK(26A425),因此標頭檔標註、Swift 介面、框架資料夾,以及三次型別檢查都是真實的,日期為9月26日。SDK 與發行說明不一致的兩處,也就是 DVDPlayback stub 與撤銷那一項的拼法,都是依 SDK 所呈現的內容回報,而不是對 27 的機器在執行期會怎麼做的斷言。3

我這週會怎麼做

  1. 從 Xcode 27 封存一次,並在公證之前拿上面那份「連結 27 後才生效」的清單逐項檢查 App:選單圖像、任何設定內容類型的開啟面板、任何走訪 NSTextView 內容選單的程式碼、標題列配件,以及任何繼承了控制項修飾器的 sheet。2
  2. 趕在使用者之前,在 27 的機器上測試手勢:父視圖上原本會與子視圖一起觸發的辨識器,現在是獨佔的;沒有實作 locationInView: 的自訂 NSGestureRecognizer 子類別會回傳原點並記錄錯誤。請留意主控台中這則 Apple 表示由 AppKit 產生的錯誤;NSGestureRecognizerCrashOnMissingOverrides 預設值的描述對象是無法抵達終止狀態的子類別,發行說明並未表示它涵蓋 locationInView:。2
  3. Grep 一下 originalFilename、FileDocument、ReferenceFileDocument、.roundedBorder、deleteEvents 與 import DVDPlayback;第一個只在 27.0 目標下警告,接下來三個是軟性且不出聲的,deleteEvents 已不存在,而 import DVDPlayback 會在您把下限提高到 27.0 的那天變成錯誤。3
  4. 如果您透過下載來出貨 agent 或 daemon,請在安裝時移除屬性列表上的隔離屬性,或改走一條從不會加上該屬性的安裝路徑;Apple 的發行說明將 27 上的 launchd 列為不再載入這類檔案。2
  5. 如果您會讀取其他團隊的容器,請移除這段程式碼,或改經由 Full Disk Access;提示已經沒有了,預設就是拒絕。2
  6. 在錯誤回報中從兩個地方記錄組建編號:機器上的 ProcessInfo,以及建置用 Mac 上 SDK 的 SystemVersion.plist。兩者並不相同,26A428 對 26A425,其中一個有的修正,另一個未必有。3

常見問題

macOS 27 何時推出?組建編號是多少?

2026年9月14日(星期一),組建 26A428,在 Apple 的 Releases 動態中與 Xcode 27 及其他 27.0 系統一同列出。Xcode 27 內的 SDK 自稱 26A425。13

macOS 27.0.1 推出了嗎?

截至2026年9月26日尚未推出。Apple 的 macOS 發行說明索引列出「macOS 27 Golden Gate Release Notes」與「macOS 27.2 Golden Gate Beta 2 Release Notes」,兩者之間沒有其他項目,Releases 動態中也沒有任何平台的 27.0.1。一旦推出,本文會加上附日期的說明。17

macOS 27 的發行說明在哪裡?

在 Apple 開發者文件網站的 macOS Release Notes 之下,這個版本有一個獨立頁面,標題為「macOS 27 Golden Gate Release Notes」,共 86 個分區,General 排第一,接著從 Accessory Access 一路到 XQuartz。27.2 beta 的發行說明則是另一個短得多的頁面。24

macOS 27 棄用了什麼?

Deprecations 標題下共有十三個條目:PHAssetResource.originalFilename、FileDocument、calendar.deleteEvents 的改名、DVDPlayback 框架、Encrypted HFS+、直接存取 TCC 資料庫、Catalyst 的場景生命週期強制要求、三則 Rosetta 條目、乾淨安裝不再附帶 AirPort Utility、一則 USDKit beta 說明,以及一則 Weather Highlights 的語言說明。只有前四項屬於 API。originalFilename 只在部署目標為 27.0 時才會警告,FileDocument 始終不出聲,deleteEvents 無法編譯,DVDPlayback 則在下限低於 27.0 時警告、等於 27.0 時失敗。23

我的 App 需要為 macOS 27 重新建置嗎?

不需要,而且正是重新建置才會改變部分行為。連結 27 後才生效的條目,只有在您以 27 SDK 封存時才會觸發;手勢、launchd、TCC、容器、TLS 與 Rosetta 的變更,無論是否重新建置,都會套用到 27 機器上的每一個二進位檔,而連結 macOS 26.0 以上的 App,在那裡本來就會失去選單的符號圖像。2

DVDPlayback 已經從 SDK 消失了嗎?

在磁碟上的 27.0 SDK 中並沒有:框架資料夾、它的 .tbd、標頭檔與 module map,全都還在 Xcode 27 的 MacOSX27.0.sdk 裡。它的函式在部署目標為 27.0 時標為不可用,低於該版本則自 10.15 起標為已棄用,所以下限為 27.0 的專案無法針對它建置,這正是說明所講的;下限較低的專案仍然可以,只是會有警告。3

Mac Catalyst 在 macOS 27 上有哪些變化?

場景生命週期強制要求適用;連結 macCatalyst 27 SDK 時可以使用 UIScene.extendStateRestoration 與 completeStateRestoration;在沒有視窗的情況下切換到 Catalyst App 時,除非從 Dock 或 Spotlight 啟用,否則不再建立視窗;UIStepper 可在 Mac 慣用介面中運作;側邊欄工具列按鈕消失的問題列為已修正。Xcode 27.2 beta 的發行說明另外提醒,那裡的 macOS SDK「incorrectly report[s] 27.1 as a valid deployment target」(錯誤地把 27.1 回報為有效的部署目標),而且以 27.1 或 27.2 建置的 Catalyst「may be unable to use newly introduced API.」(可能無法使用新引入的 API。)25

資料來源


  1. Apple,Releases,RSS 動態於2026年9月26日擷取:「macOS 27.0 (26A428)」日期為2026年9月14日(星期一),並列「Xcode 27 (27A266a)」;「macOS 27.2 beta 2 (26B5091g)」日期為2026年9月21日(星期一);直到最新的項目,即9月24日的「TestFlight 4.4.0」為止,任何平台都沒有 macOS 27.0.1 的項目。 ↩↩↩↩↩↩↩

  2. Apple,macOS 27 Golden Gate Release Notes,於2026年9月26日擷取。引用的條目,依 radar 編號:AppKit 170477566、177605020、180962967、6938919、173975472、176048351、176395420、179374305、179936632、160867808、162577742、163365571;App Intents 176751155、181800016、177198033;NSGestureRecognizer 173551081、175705302、176396492;NSApplication 168692527;SwiftUI 105893279、158160386、158441552、158441261、177458781、167448274、165913417、175594929、170678002、174628712、180300890、180301399、180302015、180302075、178776840、86580365、151015350、173362083、173990195、68559433、78212597、177185166、179388848、170480710、180301165;UIKit 141837548、161843040、170479084;Mac Catalyst 69906818、57819435、176879915;Launch Daemons and Agents 166415497;TCC 90775556;System Integrity Protection 161835690、178668601;Privacy & Security Settings 184660124;Network Security 176055825;Rosetta 168097174、163213094、171187112、176042635;Core AI 174796039、179282606;Apple Unified Logging System 160567675;PhotoKit 175412725;CoreStorage 175892420;DVDPlayback 179136240;AirPort Utility 158248382;USDKit 177417812;Weather Highlights 164408676;StoreKit 141012819、156749517、160501742、167808780;StoreKit Testing in Xcode 184155259、184255116;System 160612181、177911316;Disk Images 177868758;Virtualization 64203273;Gatekeeper 123097648;Game Controller 168071382;VideoToolbox 177635243、179040806;Metal 172520325、177318505;Foundation 161588649;Hardware Security 152103975;Swift Charts 174168981;Core Spotlight 183770678;Safari 183044008;Shortcuts 166068090、168315587;Startup Disk 166640903;Siri 171728298、176299524、176812955、177116121、177376984、177984074。計數(86 個分區;68 項 New Features、173 個 Resolved Issues、18 個 Known Issues、13 項 Deprecations)為作者清點各標題下清單項目的結果。 ↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩

  3. 作者於2026年9月26日,在執行 macOS 26.6.2 的 Mac 上檢視 Xcode 27(27A266a)內附的 macOS 27.0 SDK:MacOSX27.0.sdk/System/Library/CoreServices/SystemVersion.plist 回報 ProductBuildVersion 為 26A425、ProductVersion 為 27.0;PHAssetResource.h 在 originalFilename 上帶有 API_DEPRECATED("Use filename instead", ios(9, 27), macos(10.15, 27), tvos(10, 27), visionos(1, 27));arm64e-apple-macos 的 SwiftUI 介面在 FileDocument 上帶有 @available(macOS, introduced: 11.0, deprecated: 100000.0, message: "Conform your type to Document instead."),在 roundedBorder 上帶有 deprecated: 100000.0 與 textFieldStyle(.bordered) 的訊息;macOS 的 AppIntents 介面含 deleteEvent 一次、deleteEvents 零次;DVDPlayback.framework 內含 DVDPlayback.tbd(223 個不同的 _DVD 符號;目標為 x86_64-macos、arm64e-macos、arm64e.x1-macos)、Headers/DVDPlayback.h 與 Modules/module.modulemap;對一個匯入 DVDPlayback 並呼叫 DVDInitialize() 的檔案執行 swiftc -typecheck,在 -target arm64-apple-macos26.0 下產生「warning: ‘DVDInitialize()’ was deprecated in macOS 10.15: No longer supported」,在 -target arm64-apple-macos27.0 下產生「error: ‘DVDInitialize()’ is unavailable in macOS: No longer supported」;對一個讀取 originalFilename、遵循 FileDocument 並套用 .roundedBorder 的檔案執行 swiftc -typecheck,在 -target arm64-apple-macos26.0 下沒有診斷,在 -target arm64-apple-macos27.0 下產生一則警告「’originalFilename’ was deprecated in macOS 27: Use filename instead」;NSRefreshController.h 與 NSTextSelectionManager 介面為 API_AVAILABLE(macos(27.0));NSToolbarItemGroup.h 以 NS_SWIFT_NAME(NSToolbarItemGroup.Role) API_AVAILABLE(macos(27.0), ios(27.0)) 宣告 NSToolbarItemGroupRole,並以 API_AVAILABLE(macos(27.0)) 宣告 role 屬性,NSSegmentedControl.h 亦同;NSMenuItem.h 以 API_AVAILABLE(macos(27.0)) 宣告 preferredImageVisibility;NSGestureRecognizer.h 以 API_AVAILABLE(macos(27.0)) 宣告 cancellableByScrollGesture;NSApplication.h 以 API_AVAILABLE(macos(27.0)) 宣告 NSApplicationPresentationDisableScreenCornerInteractions,值為遮罩的第 15 位元;DiskImageKit、NowPlaying 與 AccessoryAccess 框架資料夾都存在;System 介面宣告了 public struct Stat;對一個 Chart 閉包以 if 在 BarMark 與 LineMark 之間分支的檔案執行 swiftc -typecheck,在 -target arm64-apple-macos26.0 與 -target arm64-apple-macos27.0 下都沒有診斷;StoreKit 介面含有 assigned 與 BundledSubscription,並在 Transaction.RevocationType 上宣告 public static var assignmentRevocation,原始值為 ASSIGNMENT_REVOKE,而 SDK 中沒有任何檔案含有說明所寫的 assignmentRevoked;該項以 @available(iOS 26.4, macOS 26.4, tvOS 26.4, watchOS 26.4, visionOS 26.4, *) 搭配 @backDeployed(before: iOS 27.0, macOS 27.0, tvOS 27.0, watchOS 27.0, visionOS 27.0) 宣告;ReferenceFileDocument 帶有 @available(macOS, introduced: 11.0, deprecated: 100000.0, message: "Use Document protocol instead.");NSScrollView.h 以 API_AVAILABLE(macos(27.0)) 宣告 refreshController;NSMenuItem.h 在 image 上的註解為「in macOS 27 and later, AppKit determines the visibility of menu item images, and will typically hide images」。 ↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩

  4. Apple,macOS 27.2 Golden Gate Beta 2 Release Notes,於2026年9月26日擷取:General 186939138、AppKit 186955507、Notifications 187312007、Shortcuts 187499433、StoreKit Testing in Xcode 183933307、184155259、184255116、186018916,皆有引用。 ↩↩↩

  5. Apple,Xcode 27.2 Beta Release Notes,於2026年9月26日擷取,SDK,Known Issues(187160501),有引用。 ↩

  6. Apple,App Store Connect release notes,於2026年9月26日擷取,2026年9月14日的條目,已在表格中完整引用。 ↩

  7. Apple,macOS Release Notes,索引於2026年9月26日擷取:27 的條目為「macOS 27 Golden Gate Release Notes」與「macOS 27.2 Golden Gate Beta 2 Release Notes」。 ↩↩↩

相關文章

iOS 27.0 發行說明:棄用項目、破壞性變更與修正

iOS 27.0(24A437)已於 9 月 14 日推出。從開發者角度解讀發行說明:11 項棄用、改用 27 SDK 建置後會生效的變更,以及一項我親自驗證的修正。

20 分鐘閱讀

macOS 27 Golden Gate 正式推出:開發者該注意的變更

macOS 27 Golden Gate 於 2026年9月14日推出,僅安裝於 Apple 晶片:Rosetta 最後一個通用版本、未指定架構的安裝套件預設改為 arm64,以及該讀的 GA 發行說明重點。

13 分鐘閱讀

為 iPhone Duo 做設計:什麼會移動、什麼會分割、什麼保持不動

把 Apple 的 iPhone Duo 設計指南與三場 Tech Talk 當成規則來讀:以兩個尺寸類別取代逐一適配的姿勢、摺痕處的位移、arrangement,以及側邊列。

16 分鐘閱讀