How could macOS be POSIX compliant without vi?

As macOS is POSIX compliant and Unix certified, why does vi redirects to vim? As I understand, vim is not POSIX compliant. So how did Apple obtained a Unix certification without having vi installed on their OS?


Solution 1:

It's actually optional.

Per the The Open Group Base Specifications Issue 7, 2018 edition in the Shells & Utilities Volume, the vi command states:

This utility shall be provided on systems that both support the User Portability Utilities option and define the POSIX2_CHAR_TERM symbol. On other systems it is optional.

That particular specification is a component of the Unix 03 product standard which is what macOS Catalina is certified for.