title: I want to delete all items in my self created KeyChain on Mac OS X
body: <p>I'm writing a little tool to synchronize passwords. I'm using my own KeyChain for this purpose. Prior to saving, I want to clear this KeyChain. However, it seems I don't understand how to use the SecItemDelete function.</p>
  
  <pre><code>NSMutableDictionary *deleteQuery = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
                                              kSecClassGenericPassword, kSecClass,
                                              kSecMatchLimit, kSecMatchLimitAll, nil];
  
      OSStatus status = SecItemDelete((__bridge CFDictionaryRef)deleteQuery);
      NSLog(@"%@", SecCopyErrorMessageString(status, NULL));
  </code></pre>
  
  <p>This is what I've written so far, but unfortunately my items (called Root.Foo and Root.Bar) remain in the KeyChain. Also I'm wondering, how this function knows, which KeyChain should be searched? Most examples I'm fonding are about iOS, where every Application has it own KeyChain by default.</p>
  
  <p>Thanks for any help :)</p>