Post

Replies

Boosts

Views

Activity

Reply to Supported non-admin service identity for a macOS LaunchDaemon
Hi Quinn, Thanks for clarifying. By NotFound I meant SMAppServiceStatusNotFound, read from [SMAppService agentServiceWithPlistName:PLIST_NAME].status. The containing app was opened normally and only read that property. It didn’t call register or unregister, and it didn’t use the System Extensions framework. I couldn’t read the saved evidence file or verify the process exit, so the UI status is the only result I can report for that run. For a correctly packaged but never-registered bundled LaunchAgent, would you expect NotRegistered rather than NotFound? Also, just to make sure I’m checking the right file: did you mean the BundleProgram key in the launchd plist under Contents/Library/LaunchAgents, or is there a separate requirement in the helper’s Info.plist? Thank you, Carl
Topic: App & System Services SubTopic: Core OS Tags:
6d
Reply to Supported non-admin service identity for a macOS LaunchDaemon
Hi Quinn, Thank you for testing this and sharing the working configuration. I made a fresh status-only build with new identifiers and launched the containing app normally once, rather than invoking its executable from Terminal. Its UI reported NotFound. This build contains no registration or unregistration calls, so this was not another registration attempt. Both components are signed and sandboxed, with no provisioning profiles or App Group entitlements. The bundled helper is under Contents/Library/Helpers; the LaunchAgent plist uses BundleProgram, RunAtLoad and stdout/stderr paths. Your example instead places the helper under Contents/MacOS and includes App Group entitlements and MachServices. Before attempting registration again, could you clarify: Does NotFound before registration distinguish a packaging/signing problem from an otherwise valid, unregistered service? What is the minimal supported configuration for registering a sandboxed bundled agent without XPC or an App Group? Which differences above would you check first? The status-only observation exceeded my 15-second test budget, and I could not read its saved evidence file, so I cannot draw a reliable timing conclusion. Thank you, Carl
Topic: App & System Services SubTopic: Core OS Tags:
1w
Reply to Supported non-admin service identity for a macOS LaunchDaemon
Hi Quinn, I tested a minimal sandboxed macOS app registering an independently sandboxed LaunchAgent through SMAppService on macOS 27.2. Both binaries are signed with an Apple Development identity, and the agent plist is inside the containing app’s Contents/Library/LaunchAgents directory. The agent is wrapped in an app bundle and BundleProgram points to its executable. Neither component uses an App Group or other entitlement beyond App Sandbox. Before registration, status returned NotFound. The registration call returned SMAppServiceErrorDomain code 22, and the sandbox log for the registering process reported deny(1) job-creation, with smd as the checker. A subsequent unregister returned an error, and no matching launchd job or worker process was observed. The controller’s executable was invoked from Terminal. Is there a documented signing, packaging, entitlement or launch requirement we may be missing for a sandboxed app to register a sandboxed agent? Does this denial suggest a particular condition we should investigate? I can provide a minimal reproducer and appropriately redacted logs if useful. Thank you.
Topic: App & System Services SubTopic: Core OS Tags:
1w
Reply to Supported non-admin service identity for a macOS LaunchDaemon
Hi Quinn, Thank you for the detailed response. I’m evaluating the root-plus-App-Sandbox alternative you mentioned for separately running LaunchDaemon components on macOS Golden Gate 27.2. I noticed that Apple’s “Signing a daemon with a restricted entitlement” documentation says App Sandbox is not appropriate for daemons, while your related discussion describes a sandboxed-daemon use case. Could you clarify: Supported configuration: For which daemon types, signing configurations and entitlements is App Sandbox supported or inappropriate? What supported signing, entitlement and launch configuration applies to the root-plus-App-Sandbox approach? Security isolation: Can separately running components be meaningfully isolated from one another with this approach, or is confinement primarily between each component and the wider system? What guarantees apply to credential custody, filesystem access, interprocess communication (IPC), and protection of a separate controller and authoritative data store? Startup behavior: What behavior is supported before FileVault unlock, after unlock but before user login, and after login? For these points, which properties are documented guarantees, and which would need qualification on the target macOS version and hardware? For context, I’m referring to your response here: https://developer.apple.com/forums/thread/856568?answerId=915636022 The related discussion: https://developer.apple.com/forums/thread/848726 And Apple’s daemon-signing documentation: https://developer.apple.com/documentation/xcode/signing-a-daemon-with-a-restricted-entitlement Thank you for your help.
Topic: App & System Services SubTopic: Core OS Tags:
2w
Reply to Supported non-admin service identity for a macOS LaunchDaemon
Hi Quinn, Thanks for clarifying. By NotFound I meant SMAppServiceStatusNotFound, read from [SMAppService agentServiceWithPlistName:PLIST_NAME].status. The containing app was opened normally and only read that property. It didn’t call register or unregister, and it didn’t use the System Extensions framework. I couldn’t read the saved evidence file or verify the process exit, so the UI status is the only result I can report for that run. For a correctly packaged but never-registered bundled LaunchAgent, would you expect NotRegistered rather than NotFound? Also, just to make sure I’m checking the right file: did you mean the BundleProgram key in the launchd plist under Contents/Library/LaunchAgents, or is there a separate requirement in the helper’s Info.plist? Thank you, Carl
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
6d
Reply to Supported non-admin service identity for a macOS LaunchDaemon
Hi Quinn, Thank you for testing this and sharing the working configuration. I made a fresh status-only build with new identifiers and launched the containing app normally once, rather than invoking its executable from Terminal. Its UI reported NotFound. This build contains no registration or unregistration calls, so this was not another registration attempt. Both components are signed and sandboxed, with no provisioning profiles or App Group entitlements. The bundled helper is under Contents/Library/Helpers; the LaunchAgent plist uses BundleProgram, RunAtLoad and stdout/stderr paths. Your example instead places the helper under Contents/MacOS and includes App Group entitlements and MachServices. Before attempting registration again, could you clarify: Does NotFound before registration distinguish a packaging/signing problem from an otherwise valid, unregistered service? What is the minimal supported configuration for registering a sandboxed bundled agent without XPC or an App Group? Which differences above would you check first? The status-only observation exceeded my 15-second test budget, and I could not read its saved evidence file, so I cannot draw a reliable timing conclusion. Thank you, Carl
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
1w
Reply to Supported non-admin service identity for a macOS LaunchDaemon
Hi Quinn, I tested a minimal sandboxed macOS app registering an independently sandboxed LaunchAgent through SMAppService on macOS 27.2. Both binaries are signed with an Apple Development identity, and the agent plist is inside the containing app’s Contents/Library/LaunchAgents directory. The agent is wrapped in an app bundle and BundleProgram points to its executable. Neither component uses an App Group or other entitlement beyond App Sandbox. Before registration, status returned NotFound. The registration call returned SMAppServiceErrorDomain code 22, and the sandbox log for the registering process reported deny(1) job-creation, with smd as the checker. A subsequent unregister returned an error, and no matching launchd job or worker process was observed. The controller’s executable was invoked from Terminal. Is there a documented signing, packaging, entitlement or launch requirement we may be missing for a sandboxed app to register a sandboxed agent? Does this denial suggest a particular condition we should investigate? I can provide a minimal reproducer and appropriately redacted logs if useful. Thank you.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
1w
Reply to Supported non-admin service identity for a macOS LaunchDaemon
Hi Quinn, Thank you for the detailed response. I’m evaluating the root-plus-App-Sandbox alternative you mentioned for separately running LaunchDaemon components on macOS Golden Gate 27.2. I noticed that Apple’s “Signing a daemon with a restricted entitlement” documentation says App Sandbox is not appropriate for daemons, while your related discussion describes a sandboxed-daemon use case. Could you clarify: Supported configuration: For which daemon types, signing configurations and entitlements is App Sandbox supported or inappropriate? What supported signing, entitlement and launch configuration applies to the root-plus-App-Sandbox approach? Security isolation: Can separately running components be meaningfully isolated from one another with this approach, or is confinement primarily between each component and the wider system? What guarantees apply to credential custody, filesystem access, interprocess communication (IPC), and protection of a separate controller and authoritative data store? Startup behavior: What behavior is supported before FileVault unlock, after unlock but before user login, and after login? For these points, which properties are documented guarantees, and which would need qualification on the target macOS version and hardware? For context, I’m referring to your response here: https://developer.apple.com/forums/thread/856568?answerId=915636022 The related discussion: https://developer.apple.com/forums/thread/848726 And Apple’s daemon-signing documentation: https://developer.apple.com/documentation/xcode/signing-a-daemon-with-a-restricted-entitlement Thank you for your help.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
2w