I am using the keychain wrapper found here:
https://gist.github.com/1170641
Like this:
.h :
#import "KeychainItemWrapper.h"
KeychainItemWrapper *keychainItem;
.m:
keychainItem = [[KeychainItemWrapper alloc] initWithIdentifier:@"login" accessGroup:nil];
NSString *password = [keychainItem objectForKey:(__bridge id)kSecValueData];
NSString *username = [keychainItem objectForKey:(__bridge id)kSecAttrAccount];
Then it crashes with:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_NSZeroData _fastCharacterContents]: unrecognized selector sent to instance 0x14dcba60'
EDIT:
The crash is no longer present thanks to a user who answered the question but when I retrieve the username or password they are sometimes swaped and I mean 80% of the time.