   public func delete(key: String) -> Bool {
     let prefixedKey = keyWithPrefix(key)
 
-    let query = [
+    var query: [String: NSObject] = [
       KeychainSwiftConstants.klass       : kSecClassGenericPassword,
       KeychainSwiftConstants.attrAccount : prefixedKey ]
     
+    query = addAccessGroupWhenPresent(query)
+    lastQueryParameters = query
+    
     let status: OSStatus = SecItemDelete(query as CFDictionaryRef)
     
     return status == noErr

  
  */
  public func clear() -> Bool {
    let query = [ kSecClass as String : kSecClassGenericPassword ]
    
    let status: OSStatus = SecItemDelete(query as CFDictionaryRef)
    

  public static var valueData: String { return toString(kSecValueData) }
  public static var returnData: String { return toString(kSecReturnData) }
  public static var matchLimit: String { return toString(kSecMatchLimit) }
  public static var accessGroup: String { return toString(kSecAttrAccessGroup) }

  /**
  
