如何以编程方式获取 macbook 的型号?

How can I get the model number of macbook programmatically?

我想获取 MGX72xx/AMGX82xx/AMGX92xx/A 等型号。

https://support.apple.com/en-in/HT2013001 列出所有型号。但不知道如何以编程方式获取?

您无法获取型号。

虽然你可以获得model identifier, serial number, or full marketing name