Post

Replies

Boosts

Views

Activity

Reply to Launching a signed AppKit app from a Python supervisor while preserving instance ownership and bounded cleanup
Hi Quinn, Thanks for following up. We only need one credential-app instance running at a time. If the previous instance's termination or cleanup is uncertain, the supervisor must not start another. We develop and control the source code for the signed AppKit application ourselves. It is not a third-party application. Thanks again for your guidance.
5d
Reply to Launching a signed AppKit app from a Python supervisor while preserving instance ownership and bounded cleanup
Hi Quinn, Thank you again for your guidance. I wanted to briefly clarify our overall goal so we can identify the simplest supported solution rather than continue experimenting with launch methods. We’re building a local, owner-operated credential application for a supervised trading DEMO system. The credential UI runs separately from our Python supervisor, and we need to prevent unauthorized or late credential operations. Our current blocker: Launching the signed AppKit app directly as a supervised child preserves process ownership, startup messages and exit verification, but macOS 14.5 never reports the app as active. It reaches our two-second activation deadline and exits before displaying the credential window. Your NSWorkspace recommendation provides a promising alternative, but we haven’t established how to preserve the required supervision protections. Our three essential requirements are: Safe admission: An application launched late cannot perform credential operations after the supervisor’s original deadline. Authenticated communication: Authorization and nonsecret status messages must be bound to the exact launched application instance. Verified termination: The supervisor must distinguish requesting termination from observing the application’s actual exit and confirming cleanup. Would you recommend NSWorkspace combined with XPC or another authenticated local IPC mechanism, with the application enforcing the original admission deadline? Or is there a simpler Apple-supported pattern? If macOS doesn’t guarantee these outcomes directly, which parts should our application enforce itself? A recommended architecture or relevant Apple example would be extremely helpful. We’re trying to avoid unnecessary helper applications or redesigning unrelated components. Thank you for your time and guidance.
6d
Reply to Launching a signed AppKit app from a Python supervisor while preserving instance ownership and bounded cleanup
Thanks, Quinn. Your distinction between a child-process launch and an NSWorkspace launch was helpful. We have a few focused follow-up questions about supervising an NSWorkspace-launched app: Is there a documented way to cancel or bound an outstanding asynchronous launch? If its completion arrives after the supervisor’s original deadline, what supported pattern would you recommend for handling that late completion and any resulting app instance? For an app that is not the supervisor’s direct child, what supported pattern would you recommend for identifying the exact launched instance and observing confirmed termination, including PID reuse and an instance that exits before observation is established? Can those outcomes reasonably be achieved with a narrowly scoped integration, without a separate foreground GUI bridge or process reparenting? If not, what minimum broader change would you suggest? We understand that we still need to independently design and validate authenticated, per-attempt status reporting, admission against the original deadline, and cleanup. We are not assuming NSRunningApplication alone proves launch provenance, authorized control, or cleanup.
1w
Reply to Launching a signed AppKit app from a Python supervisor while preserving instance ownership and bounded cleanup
Hi Quinn, Thanks for following up. We only need one credential-app instance running at a time. If the previous instance's termination or cleanup is uncertain, the supervisor must not start another. We develop and control the source code for the signed AppKit application ourselves. It is not a third-party application. Thanks again for your guidance.
Replies
Boosts
Views
Activity
5d
Reply to Launching a signed AppKit app from a Python supervisor while preserving instance ownership and bounded cleanup
Hi Quinn, Thank you again for your guidance. I wanted to briefly clarify our overall goal so we can identify the simplest supported solution rather than continue experimenting with launch methods. We’re building a local, owner-operated credential application for a supervised trading DEMO system. The credential UI runs separately from our Python supervisor, and we need to prevent unauthorized or late credential operations. Our current blocker: Launching the signed AppKit app directly as a supervised child preserves process ownership, startup messages and exit verification, but macOS 14.5 never reports the app as active. It reaches our two-second activation deadline and exits before displaying the credential window. Your NSWorkspace recommendation provides a promising alternative, but we haven’t established how to preserve the required supervision protections. Our three essential requirements are: Safe admission: An application launched late cannot perform credential operations after the supervisor’s original deadline. Authenticated communication: Authorization and nonsecret status messages must be bound to the exact launched application instance. Verified termination: The supervisor must distinguish requesting termination from observing the application’s actual exit and confirming cleanup. Would you recommend NSWorkspace combined with XPC or another authenticated local IPC mechanism, with the application enforcing the original admission deadline? Or is there a simpler Apple-supported pattern? If macOS doesn’t guarantee these outcomes directly, which parts should our application enforce itself? A recommended architecture or relevant Apple example would be extremely helpful. We’re trying to avoid unnecessary helper applications or redesigning unrelated components. Thank you for your time and guidance.
Replies
Boosts
Views
Activity
6d
Reply to Launching a signed AppKit app from a Python supervisor while preserving instance ownership and bounded cleanup
Thanks, Quinn. Your distinction between a child-process launch and an NSWorkspace launch was helpful. We have a few focused follow-up questions about supervising an NSWorkspace-launched app: Is there a documented way to cancel or bound an outstanding asynchronous launch? If its completion arrives after the supervisor’s original deadline, what supported pattern would you recommend for handling that late completion and any resulting app instance? For an app that is not the supervisor’s direct child, what supported pattern would you recommend for identifying the exact launched instance and observing confirmed termination, including PID reuse and an instance that exits before observation is established? Can those outcomes reasonably be achieved with a narrowly scoped integration, without a separate foreground GUI bridge or process reparenting? If not, what minimum broader change would you suggest? We understand that we still need to independently design and validate authenticated, per-attempt status reporting, admission against the original deadline, and cleanup. We are not assuming NSRunningApplication alone proves launch provenance, authorized control, or cleanup.
Replies
Boosts
Views
Activity
1w