Post

Replies

Boosts

Views

Activity

Reply to SMAppService: How to recover from broken LaunchDaemon registration in Login Items
My comments seem to be disappearing for some reason, so replying: @Platskies: Also trying to reset the state of "Login Items Added by Apps", and I tried this, but said that the command wasn't found. Is that an issue in the first beta, perhaps?  There's a typo in the original reply, it should be sfltool, not sftool. @Frameworks Engineer That is the current behavior. The state is persisted to preserve user intent. Not sure I like the idea of preserving the consent beyond the lifetime of an app on my system. If I delete an app, I typically would like to revoke all consent as well. Also I probably wouldn't want an ever-growing list of apps with login items that were installed on my Mac.
Jun ’22
Reply to SMAppService: How to recover from broken LaunchDaemon registration in Login Items
I restored to a snapshot now and tried again. This time, I think I did everything right: Queried the status of my daemon, got notRegistered (0). Installed my daemon using SMAppService. Didn't throw, entry appeared in Login Items. Queried the status again, got requiresApproval (2). Turned on the daemon in System Settings. Saw it start up and run, producing the expected periodic log messages. Queried the status again, got enabled (1). Unregistered the daemon. Saw it terminated and stop logging its periodic messages. Queried the status again, got notRegistered (0). However, the entry in System Settings > General > Login Items is not gone. It's still there and enabled. It also persists across reboots & after removing all copies of my app. So I guess there's still something I missed, or this is simply a bug in the current beta...
Jun ’22