A transport using a startup-only proxy snapshot can remain stale after a network or location change. For a macOS SystemConfiguration subscription, keep this lifecycle explicit:

  1. Create an SCDynamicStore session with a callback.
  2. Register exact keys or patterns using SCDynamicStoreSetNotificationKeys. They are separate arrays. The global proxy key is State:/Network/Global/Proxies; add service-specific inputs only where the transport consumes them.
  3. Arrange callback delivery through SCDynamicStoreSetDispatchQueue or the appropriate run-loop source. Registering names alone does not run the callback.
  4. On notification, reread effective configuration and update subsequent work. The changed-key list is not itself the complete new policy.
  5. At shutdown, disable dispatch delivery with a null queue before releasing owned resources. Keep the store and callback context alive until then.

Apple's header defines an empty changed-key list as a dynamic-store server restart. Refresh relevant state and discard assumptions based on the previous contents in that case too.

This is a public macOS API approach. Apple's headers mark the corresponding functions private SPI for iOS, so the same subscription is not a public iOS application interface.

Erthyglow kevrennek