Is there any API available to Swift that provides the name (which should be an email address, AFAIK) of the Apple ID associated with the current macOS user?
The following command line seems to provide the correct info, but I'd prefer not to have to run a separate Process to get this info in my Swift code:
defaults read MobileMeAccounts | plutil -extract "Accounts".0."AccountID" raw -o - -
Thanks.