DefaultUserKeySelector

public class DefaultUserKeySelector : UserKeySelector, @unchecked Sendable

The default implementation of UserKeySelector that uses a system alert to prompt the user.

  • Declaration

    Swift

    public init()
  • Prompts the user to select a key from the available options using a system alert.

    Declaration

    Swift

    public func selectKey(userKeys: [UserKey], prompt: Prompt) async -> UserKey?

    Parameters

    userKeys

    An array of available user keys to choose from.

    prompt

    The prompt information to display to the user.

    Return Value

    The selected UserKey, or nil if the user cancels.