Service Management how to register handle_checkbox_toggle?

Hi, I noticed in this page, there is no explanation about who/when/how the method handle_checkbox_toggle is called.

Page: https://developer.apple.com/documentation/servicemanagement/updating-helper-executables-from-earlier-versions-of-macos?language=objc

Ultimately, how should the app come to know when a app service is allowed or disallowed in System Settings > Login Items ?

Answered by DTS Engineer in 801636022

I think you’ve misunderstood the nature of that method. In the page you referenced, handle_checkbox_toggle(_:) shows how your app would respond to the user clicking a checkbox within your app to enable the login item. It’s not meant to show anything to do with the user clicking things in System Settings.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

I think you’ve misunderstood the nature of that method. In the page you referenced, handle_checkbox_toggle(_:) shows how your app would respond to the user clicking a checkbox within your app to enable the login item. It’s not meant to show anything to do with the user clicking things in System Settings.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Service Management how to register handle_checkbox_toggle?
 
 
Q