Is it possible to display the username of the current user in a macOS app?
You can use the NSUserName()
function:
var username = NSUserName()!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With