Platforms to show: All Mac Windows Linux Cross-Platform

Back to KeychainAccessControlMBS class.

KeychainAccessControlMBS.CreateWithFlags(protection as String, Flags as Integer, byref error as Variant) as KeychainAccessControlMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Keychain MBS MacClassic Plugin 18.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates new access control object based on protection type and additional flags.

Created access control object should be used as a value for kSecAttrAccessControl attribute in AddItem or UpdateItem functions. Accessing keychain items or performing operations on keys which are protected by access control objects can block the execution because of UI which can appear to satisfy the access control conditions, therefore it is recommended to either move those potentially blocking operations out of the main application thread or use combination of kSecUseAuthenticationContext and kSecUseAuthenticationUI attributes to control where the UI interaction can appear.

protection: Protection class to be used for the item. One of kSecAttrAccessible constants.
flags: If no flags are set then all operations are allowed.
error: Additional error information filled in case of failure. a CFErrorMBS object.

Returns newly created access control object.

KeychainAccessControlMBS.kSecAttrAccessibleAfterFirstUnlock as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Keychain MBS MacClassic Plugin 18.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the Accessible values.

Item data can only be accessed once the device has been unlocked after a restart. This is recommended for items that need to be accesible by background applications. Items with this attribute will migrate to a new device when using encrypted backups.

KeychainAccessControlMBS.kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Keychain MBS MacClassic Plugin 18.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the Accessible values.

Item data can only be accessed once the device has been unlocked after a restart. This is recommended for items that need to be accessible by background applications. Items with this attribute will never migrate to a new device, so after a backup is restored to a new device these items will be missing.

KeychainAccessControlMBS.kSecAttrAccessibleAlways as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Keychain MBS MacClassic Plugin 18.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the Accessible values.

Item data can always be accessed regardless of the lock state of the device. This is not recommended for anything except system use. Items with this attribute will migrate to a new device when using encrypted backups.

KeychainAccessControlMBS.kSecAttrAccessibleAlwaysThisDeviceOnly as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Keychain MBS MacClassic Plugin 18.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the Accessible values.

Item data can always be accessed regardless of the lock state of the device. This option is not recommended for anything except system use. Items with this attribute will never migrate to a new device, so after a backup is restored to a new device, these items will be missing.

KeychainAccessControlMBS.kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Keychain MBS MacClassic Plugin 18.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the Accessible values.

Item data can only be accessed while the device is unlocked. This is recommended for items that only need to be accessible while the application is in the foreground and requires a passcode to be set on the device. Items with this attribute will never migrate to a new device, so after a backup is restored to a new device, these items will be missing. This attribute will not be available on devices without a passcode. Disabling the device passcode will cause all previously protected items to be deleted.

KeychainAccessControlMBS.kSecAttrAccessibleWhenUnlocked as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Keychain MBS MacClassic Plugin 18.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the Accessible values.

Item data can only be accessed while the device is unlocked. This is recommended for items that only need be accesible while the application is in the foreground. Items with this attribute will migrate to a new device when using encrypted backups.

KeychainAccessControlMBS.kSecAttrAccessibleWhenUnlockedThisDeviceOnly as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Keychain MBS MacClassic Plugin 18.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the Accessible values.

Item data can only be accessed while the device is unlocked. This is recommended for items that only need be accesible while the application is in the foreground. Items with this attribute will never migrate to a new device, so after a backup is restored to a new device, these items will be missing.

The items on this page are in the following plugins: MBS MacClassic Plugin.


The biggest plugin in space...