Post

Replies

Boosts

Views

Activity

Swift executables in installer packages (.pkg) preinstall/postinstall
It seems that preinstall/postinstall scripts in installer packages (.pkg) are not limited to shell scripts, but can be any kind of executable (e.g. compiled Swift programs). This sounds like an exciting possibility to re-use logic, constants, tests etc. from the app that is being installed, and at the same time benefit from Swift features like type safety for complex installer scripts. Has anyone done this? What were your experiences? Is it advisable, or is it likely to break on the next OS update?
2
0
357
Dec ’24
What does the Legacy Background Tasks toggle do on macOS 15?
On macOS 15 Sequoia, there is a new Legacy Background Tasks toggle in System Settings > Login Items & Extensions. It seems to initially appear (in an "on" state) when an app tries to install a launchd job and places a launch plist in /Library/LaunchDaemons. I have not found any effects of turning this toggle off. I still seem to be able to happily use launchctl bootstrap and launchctl bootout, for example. What does this toggle do? Is there a WWDC session or documentation I haven't found yet?
1
2
1.4k
Jun ’24
SMAppService: How to recover from broken LaunchDaemon registration in Login Items
I was trying out SMAppService on macOS Ventura to register LaunchDaemons and LaunchAgents. Apparently I didn't get it quite right 🙈 So now I am in a situation where I registered a LaunchDaemons (it showed up in System Settings > General > Login Items) and did not throw an error on registering, but it doesn't really work and I am not able to unregister it. SMAppService.unregister() returns SMAppServiceErrorDomain Code 113 "Could not find the specified service". The SMAppService instance I am trying to use for unregistering was created the same way that I registered, using SMAppService.daemon(plistName: "some.plist"). Is there any way to reset the state or remove the broken daemon config manually? I tried removing all copies of my app from the system and rebooting, but that didn't clean it out.
8
1
5.5k
Sep ’22
Swift executables in installer packages (.pkg) preinstall/postinstall
It seems that preinstall/postinstall scripts in installer packages (.pkg) are not limited to shell scripts, but can be any kind of executable (e.g. compiled Swift programs). This sounds like an exciting possibility to re-use logic, constants, tests etc. from the app that is being installed, and at the same time benefit from Swift features like type safety for complex installer scripts. Has anyone done this? What were your experiences? Is it advisable, or is it likely to break on the next OS update?
Replies
2
Boosts
0
Views
357
Activity
Dec ’24
What does the Legacy Background Tasks toggle do on macOS 15?
On macOS 15 Sequoia, there is a new Legacy Background Tasks toggle in System Settings > Login Items & Extensions. It seems to initially appear (in an "on" state) when an app tries to install a launchd job and places a launch plist in /Library/LaunchDaemons. I have not found any effects of turning this toggle off. I still seem to be able to happily use launchctl bootstrap and launchctl bootout, for example. What does this toggle do? Is there a WWDC session or documentation I haven't found yet?
Replies
1
Boosts
2
Views
1.4k
Activity
Jun ’24
SMAppService: How to recover from broken LaunchDaemon registration in Login Items
I was trying out SMAppService on macOS Ventura to register LaunchDaemons and LaunchAgents. Apparently I didn't get it quite right 🙈 So now I am in a situation where I registered a LaunchDaemons (it showed up in System Settings > General > Login Items) and did not throw an error on registering, but it doesn't really work and I am not able to unregister it. SMAppService.unregister() returns SMAppServiceErrorDomain Code 113 "Could not find the specified service". The SMAppService instance I am trying to use for unregistering was created the same way that I registered, using SMAppService.daemon(plistName: "some.plist"). Is there any way to reset the state or remove the broken daemon config manually? I tried removing all copies of my app from the system and rebooting, but that didn't clean it out.
Replies
8
Boosts
1
Views
5.5k
Activity
Sep ’22