The easiest way is to open your simulator and go to:
"iOS Simulator -> Reset Content and Settings" This will reset everything in the simulator and return it to the default settings.
If you want to do this with code, you can do it like this:
NSArray *secItemClasses = @[(__bridge id)kSecClassGenericPassword, (__bridge id)kSecClassInternetPassword, (__bridge id)kSecClassCertificate, (__bridge id)kSecClassKey, (__bridge id)kSecClassIdentity]; for (id secItemClass in secItemClasses) { NSDictionary *spec = @{(__bridge id)kSecClass: secItemClass}; SecItemDelete((__bridge CFDictionaryRef)spec); }
Segev
source share