|
|
@@ -314,6 +314,7 @@ public enum KeychainSwiftAccessOptions {
|
|
|
This is recommended for items that only need to be accessible while the application is in the foreground. Items with this attribute never migrate to a new device. After a backup is restored to a new device, these items are missing. No items can be stored in this class on devices without a passcode. Disabling the device passcode causes all items in this class to be deleted.
|
|
|
|
|
|
*/
|
|
|
+ @available(iOS 8, *)
|
|
|
case AccessibleWhenPasscodeSetThisDeviceOnly
|
|
|
|
|
|
/**
|
|
|
@@ -347,7 +348,11 @@ public enum KeychainSwiftAccessOptions {
|
|
|
return toString(kSecAttrAccessibleAlways)
|
|
|
|
|
|
case .AccessibleWhenPasscodeSetThisDeviceOnly:
|
|
|
- return toString(kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly)
|
|
|
+ if #available(iOS 8.0, *) {
|
|
|
+ return toString(kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly)
|
|
|
+ } else {
|
|
|
+ fatalError("'kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly' is only available on iOS 8.0 or newer")
|
|
|
+ }
|
|
|
|
|
|
case .AccessibleAlwaysThisDeviceOnly:
|
|
|
return toString(kSecAttrAccessibleAlwaysThisDeviceOnly)
|