Skip to main 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

  • access_control_flags - Keychain access control flags that define security conditions for accessing items.
  • accessibility - Defines the accessibility level of the keychain item.
  • account_name - Represents the service or application name associated with the item.
  • auth_ui_behavior - Controls how authentication UI is presented during secure operations.
  • comment - A comment associated with the keychain item.
  • creation_date - The creation date of the keychain item.
  • description - A description of the keychain item.
  • group_id - Specifies the app group for shared access.
  • invisible - Indicates whether the keychain item is hidden from user-visible lists.
  • is_negative - Indicates whether the item is a placeholder or a negative entry.
  • is_persistent - Indicates whether to return a persistent reference to the keychain item.
  • label - A user-visible label for the keychain item.
  • last_modified_date - The last modification date of the keychain item.
  • result_limit - Specifies the maximum number of results to return in a query.
  • synchronizable - Indicates whether the keychain item should be synchronized with iCloud.

Properties

access_control_flagsclass-attributeinstance-attribute

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

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

accessibilityclass-attributeinstance-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_nameclass-attributeinstance-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_behaviorclass-attributeinstance-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.

commentclass-attributeinstance-attribute

comment: Optional[str] = None

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

creation_dateclass-attributeinstance-attribute

creation_date: Optional[datetime] = None

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

descriptionclass-attributeinstance-attribute

description: Optional[str] = None

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

group_idclass-attributeinstance-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.

invisibleclass-attributeinstance-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_negativeclass-attributeinstance-attribute

is_negative: Optional[bool] = None

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

is_persistentclass-attributeinstance-attribute

is_persistent: Optional[bool] = None

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

labelclass-attributeinstance-attribute

label: Optional[str] = None

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

last_modified_dateclass-attributeinstance-attribute

last_modified_date: Optional[datetime] = None

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

result_limitclass-attributeinstance-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.

synchronizableclass-attributeinstance-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