当提到旧版本的 macOS 时,我们还称它为 OS X 吗?

When referring to an older version of macOS, do we still call it OS X?

我目前正在为一个项目编写一些文档,该项目具有相同功能的两个实现:一个使用 Cocoa (10.10+) 实现兼容性,另一个使用 SwiftUI (10.15+)。

在提到 Cocoa 版本时,是否应该使用 “已弃用” 名称?即


奖金问题: 当指代与 iOS 和 iPadOS 普遍兼容的项目时(基本上是我的所有 UIKit 项目) , 将其简单地称为“iOS 项目是否合适?”或者将 OS 名称的两种变体都包括在内会更准确吗?

Apple 的文档甚至在重命名之前的构建中都使用 macOS。 使用 NSStackView's docs,您可以看到他们正在使用“macOS 10.9+”。

实际上,如果您将它们互换使用,人们就不会感到困惑。


奖金问题更新: Apple 的文档也在这里提供了答案! 看看SwiftUI的List,你会发现他们并没有专门喊出iPadOS,只是把它和iOS.

混为一谈

根据 Apple Style Guide, you should use "OS X Yosemite 10.10 or later" (except in developer documentation, which uses "macOS" when the range includes 10.12 or later versions). Here's the relevant section:

Mac operating systems have a version name and a version number. If you include both the name and the number, place the name first. Don’t place the name in quotation marks, and don’t include the word version or the letter v.

To refer to specific versions of the Mac operating system, follow these guidelines, depending on the version number:

  • 10.12 or later: Use macOS. To refer to a specific version of macOS, you can use its name, its version number, or both. Always include macOS.

        macOS Sierra
        macOS 10.12
        macOS Sierra 10.12

  • 10.8 through 10.11: Use OS X. To refer to a specific version of OS X, you can use its name, its version number, or both. Always include OS X.

        OS X El Capitan
        OS X 10.11
        OS X El Capitan 10.11

  • 10.0 through 10.7: Use Mac OS X. Include the version number only.

        Correct: Mac OS X 10.7

        Incorrect: Mac OS X Lion 10.7

When referring to a range of OS versions that includes both macOS and earlier versions, use the name (or version number) of the earliest version followed by or later.

    Correct: To use Handoff, you must have OS X Yosemite 10.10 or later installed.

    Incorrect: To use Handoff, you must have macOS Yosemite 10.10 or later installed. [Version 10.10 was called OS X, not macOS.]

Exception: If a range of versions includes both macOS and earlier versions, developer publications refer to all included versions as macOS.