DesktopPermissionHandlerRegistry

A registry real platform modules register into, mirroring IosPermissionHandlerRegistry.

grant-core's own jvmMain never populates this — it has no macOS/Windows framework dependency and never will (that is the point of isolating them). The grant-desktop module (opt-in, carries JNA + the macOS TCC bridge) calls register from its initialize(), the same pattern grant-contacts/grant-calendar/grant-motion already use for iOS. A consumer that never adds grant-desktop sees every desktop-only dev.brewkits.grant.AppGrant resolve to GrantStatus.DENIED_ALWAYS — an honest "not backed on this platform", never a fabricated grant.

Properties

Link copied to clipboard

Opens the OS's privacy settings UI, if a real one is registered — grant-core's own jvmMain never sets this (it has no AppKit dependency; see PlatformGrantDelegate.jvm.kt), so this stays null unless grant-desktop (or an equivalent opt-in module) provides one.

Functions

Link copied to clipboard
fun register(identifier: String, handler: DesktopPermissionHandler)

Registers a handler for a specific permission identifier (an dev.brewkits.grant.AppGrant.identifier or a dev.brewkits.grant.RawPermission identifier).