paulgalow.com

What macOS version did I just download? (Big Sur edition)

November 24, 2020

A new macOS release ≠ a new version

A few days ago, Apple released an updated build of macOS 11.0.1 to address a bug that prevented some older MacBook Pro computers from upgrading to Big Sur. Rather than incrementing the release version to 11.0.2 or similar, Apple instead once more only released a new build version: “20B50” in this case. This process has been long known in the Mac Admins community, with some fellow admins now recommending using build version strings instead of release version numbers when determining the current OS. Fortunately, Apple publishes the latest build versions on its developer portal.

Apple Developer Portal
Apple Developer Portal

When downloading a fresh installer for Big Sur from Apple, however, this useful piece of information is not communicated and immediately evident. Unfortunately, Apple’s Big Sur listing on the Mac App Store only lists the current release version with its build version nowhere to be found.

Mac App Store Versioning
Mac App Store Versioning

All right, let’s download the installer and check the “Install macOS Big Sur” installer app itself for any build version clues.

InstallAssistant's Finder info
InstallAssistant's Finder info

Upon inspecting the app in Finder we are presented with another version number, “16.1.04” in this case. Drilling down further into Contents/Info.plist reveals another set of build numbers such as “BuildMachineOSBuild”, “DTPlatformBuild” or “DTXcodeBuild”. None of them contain our official build version string of “20B50”.

How to determine InstallAssistant’s build number on Big Sur

In 2017 Tim Sutton published a very helpful blog post on how to extract version and build string from a macOS installer. Up until Catalina I have been using his findings to determine the exact versions of Apple’s installers. However, with the release of Big Sur things have changed.

Here are the steps to extract our desired information from a Big Sur InstallAssistant using the command line:

  1. Mount Contents/SharedSupport/SharedSupport.dmg:

    hdiutil attach -noverify -quiet \
    "/Applications/Install macOS Big Sur.app/Contents/SharedSupport/SharedSupport.dmg"
  2. Extract “OSVersion” and “Build” keys from com_apple_MobileAsset_MacSoftwareUpdate.xml:

    /usr/libexec/PlistBuddy \
    -c "Print :Assets:0:OSVersion" \
    -c "Print :Assets:0:Build" \
    "/Volumes/Shared Support/com_apple_MobileAsset_MacSoftwareUpdate/com_apple_MobileAsset_MacSoftwareUpdate.xml"

    Output:

    11.0.1
    20B50
  3. Unmount Shared Support volume

    hdiutil detach -quiet "/Volumes/Shared Support/"

How can I automate this

I have written a simple shell script to automate this process. Save it to disk and pass it a path to a macOS Big Sur InstallAssistant app, like so:

./get-macos-build.sh "/Applications/Install macOS Big Sur.app/"

Looking ahead

Since Apple uses the macOS build version to identify and distinguish its installers, I would suggest publishing that information directly inside InstallAssistant’s info.plist. Perhaps even make it visible in Finder? That would be neat and simplify my deployment workflow. Or perhaps there might be an easier method to extract that information? If there is, I would like to know.


Paul Galow

Hi, I'm Paul Galow, and I'm an engineer based in Leipzig specialising in AWS with a focus on Serverless. I'm also an IT manager and a Mac admin.
GitHubTwitterLinkedIn