Skip to content

AppleOptions

Specific options for Apple platforms (iOS/macOS) for secure storage.

This class allows configuring keychain access and storage behavior. Use IOSOptions for iOS-specific configuration or MacOsOptions for macOS-specific configuration.

Note
  • Most options apply to both iOS and macOS
  • Some options (like group_id on macOS) only apply when certain keychain flags are set
  • See individual option documentation for platform-specific behavior

Properties

Properties#

access_control_flags class-attribute instance-attribute #

access_control_flags: list[AccessControlFlag] = field(
    default_factory=list
)

Keychain access control flags that define security conditions for accessing items.

accessibility class-attribute instance-attribute #

Defines the accessibility level of the keychain item.

Controls when the item is accessible (e.g., when device is unlocked or after first unlock).

account_name class-attribute instance-attribute #

account_name: Optional[str] = 'flet_secure_storage_service'

Represents the service or application name associated with the item.

Typically used to group related keychain items.

auth_ui_behavior class-attribute instance-attribute #

auth_ui_behavior: Optional[str] = None

Controls how authentication UI is presented during secure operations. Determines whether authentication prompts are displayed to the user.

comment class-attribute instance-attribute #

comment: Optional[str] = None

A comment associated with the keychain item. Often used for metadata or debugging information.

creation_date class-attribute instance-attribute #

creation_date: Optional[datetime] = None

The creation date of the keychain item. Automatically set by the system when an item is created.

description class-attribute instance-attribute #

description: Optional[str] = None

A description of the keychain item. Can describe a category of items (shared) or a specific item (unique).

group_id class-attribute instance-attribute #

group_id: Optional[str] = None

Specifies the app group for shared access. Allows multiple apps in the same app group to access the item.

invisible class-attribute instance-attribute #

invisible: Optional[bool] = None

Indicates whether the keychain item is hidden from user-visible lists. Can apply to all items in a category (shared) or specific items (unique).

is_negative class-attribute instance-attribute #

is_negative: Optional[bool] = None

Indicates whether the item is a placeholder or a negative entry. Typically unique to individual keychain items.

is_persistent class-attribute instance-attribute #

is_persistent: Optional[bool] = None

Indicates whether to return a persistent reference to the keychain item. Used for persistent access across app sessions.

label class-attribute instance-attribute #

label: Optional[str] = None

A user-visible label for the keychain item. Helps identify the item in keychain management tools.

last_modified_date class-attribute instance-attribute #

last_modified_date: Optional[datetime] = None

The last modification date of the keychain item. Automatically updated when an item is modified.

result_limit class-attribute instance-attribute #

result_limit: Optional[int] = None

Specifies the maximum number of results to return in a query. For example, 1 for a single result, or None for all matching results.

synchronizable class-attribute instance-attribute #

synchronizable: bool = False

Indicates whether the keychain item should be synchronized with iCloud.

  • True: Enables synchronization across user's devices
  • False: Item stays local to this device only