We are developing a local approval workflow with a Swift helper in the user's graphical login session. It must withhold approval unless the relevant GUI session is known to be unlocked, and invalidate that approval context on lock or session change. An unlock must not reactivate an old approval context.
The read-only prototype can establish on-console/login status and whether a selected main display is awake. It deliberately keeps graphical unlock state unknown and stops. We do not treat an active session, an awake display, screen-sharing access, or successful authentication as proof of graphical unlock.
We have read the Apple DTS discussion below. We understand that protected-data availability concerns the keybag and is not guaranteed to track every GUI screen-lock condition. We are not requesting internal APIs or using undocumented lock-state keys.
Could you clarify the supported contract for this single requirement?
Initial state and session binding: Is there a supported way for a newly started or restarted helper to obtain the current lock state of its specific GUI session, including Fast User Switching and Screen Sharing? If Endpoint Security is relevant, how should that GUI context be matched to its opaque graphical_session_id? We do not assume it equals an audit session ID.
Transition coverage and recovery: Which supported notifications cover lock, unlock, and relevant session changes? Is there a documented way to combine an initial state with a subscription without missing a transition, and to detect or recover from dropped events or observer restarts?
Delivery guarantees: Are ordering, completeness, and maximum delivery latency documented? Which limits apply during suspension, queue stalls, user switching, or Screen Sharing? If there is no bounded guarantee or supported current-state query, please state that explicitly so we can keep approval disabled rather than infer unlocked state from silence or a previous notification.
Please identify applicable macOS versions, required entitlements/permissions, and known exclusions. If this requirement has no supported guarantee, what supported boundary would you recommend? We will not silently substitute protected-data readiness for graphical unlock.
Related Apple DTS discussion:
https://developer.apple.com/forums/thread/850327
Topic:
App & System Services
SubTopic:
Core OS
0
0
68