Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

SMAppService getting notified when status changes externally (from System Settings)

Say I want to sync a toggle in my app with SMAppService's .status property.

If the status changes from my app I can track it. But if user toggles it from System Settings, I don't see a notification so then the UI in my app is out of date.

The status property is not key value observable and there doesn't appear to be a SMAppServiceStatusDidChangeNotification ?

I can re-read it every time my app will become active but feels kind of wrong to do it this way.

Answered by DTS Engineer in 840102022

I believe your analysis is essentially correct. My advice is that you file an enhancement request for some sort of notification API.

Please post your bug number, just for the record.

I can re-read it every time my app will become active

One other option is to monitor the state of the resulting launchd job. However, polling the SMAppService.status property is going to be a lot easier and will handle more cases.

Share and Enjoy

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

I believe your analysis is essentially correct. My advice is that you file an enhancement request for some sort of notification API.

Please post your bug number, just for the record.

I can re-read it every time my app will become active

One other option is to monitor the state of the resulting launchd job. However, polling the SMAppService.status property is going to be a lot easier and will handle more cases.

Share and Enjoy

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

FB17671405

SMAppService getting notified when status changes externally (from System Settings)
 
 
Q