         
         query[kSecAttrAccount as String] = key
         #if os(iOS)
-        if floor(NSFoundationVersionNumber) > floor(NSFoundationVersionNumber_iOS_7_1) {
+        if #available(iOS 8.0, *) {
             query[kSecUseNoAuthenticationUI as String] = kCFBooleanTrue
         }
         #endif

extension Accessibility : RawRepresentable, CustomStringConvertible {
    
    public init?(rawValue: String) {
        guard #available(OSX 10.10, *) else  {
            return nil
        }
        switch rawValue {

extension AuthenticationPolicy : RawRepresentable, CustomStringConvertible {
    
    public init?(rawValue: Int) {
        guard #available(OSX 10.10, iOS 8.0, *) else  {
            return nil
        }
        let flags = SecAccessControlCreateFlags.UserPresence
