iOS
#
keychainServiceYou can choose the keychain's service which you want to use. Otherwise, the default is app
#
touchIDEnable TouchID for iOS and fingerprint authentication for Android
SInfo.setItem('key1', 'value1', { ... touchID: true,});
#
kSecAccessControlWhen passing in the touchID option as true
, you can also set kSecAccessControl
. For example:
SInfo.setItem('key1', 'value1', { keychainService: 'myKeychain', kSecAccessControl: 'kSecAccessControlTouchIDCurrentSet', sharedPreferencesName: 'mySharedPrefs', touchID: true,});
Note: By default kSecAccessControl
will get set to kSecAccessControlUserPresence
.
#
kSecAttrSynchronizableYou can set this to true
in order to sync the keychain items with iCloud.
Note: By default kSecAttrSynchronizable
will get set to false
.
#
kLocalizedFallbackTitleYou can set this to a string and fallback to pin code authentication.
#
kSecUseOperationPromptWhen touchID
is true
you must pass kSecUseOperationPrompt
to inform users why are you prompting TouchID or FaceID.
#
Enable Face IDTo enable Face ID, for iOS X and above or iPad Pro, set kSecAccessControl
to kSecAccessControlBiometryAny
. For example:
SInfo.setItem('key1', 'value1', { keychainService: 'myKeychain', kSecAccessControl: 'kSecAccessControlBiometryAny', ...});