I stored some information in the keychain, and there is a case that I need to remove all of the items, instead of doing [keychain removeObjectForKey:theKey]
for all the keys, can I do:
NSDictionary *spec = [NSDictionary dictionaryWithObjectsAndKeys:(id)kSecClassGenericPassword, kSecClass,
[self serviceName], kSecAttrService, nil];
return !SecItemDelete((CFDictionaryRef)spec);
instead?
I tried it and it worked, just not sure if I am doing the correct thing?