We use the new MacOS Ventura SMAppService functionality to offer a "Launch at Login" feature to our users. We do this in a very straightforward way:
SMAppService.mainApp.register()
We'd like to do some specific processing if we are launched at startup/login that we wouldn't do if just launched regularly. Specifically our users would prefer not to see any windows/UI if launched at startup as a menu bar app.
Is there any way to detect that our App has been launched at startup/login vs a regular user initiated launch?
Perhaps a command line argument or is there a special parent process we could look for? There doesn't seem to be a way to pass command line arguments and we don't know of any special parent process we could look for.