when i use this in simulator it is working, but when i run it in iPhone device does not work.
why this happen, how to do this?
- (void) RememberUserAccount:(NSString *) userName password:(NSString *) password {
//NSString *uuid = [[NSUUID UUID] UUIDString];
NSString *identifierForVendor = [[UIDevice currentDevice].identifierForVendor UUIDString];
KeychainItemWrapper *keyWrapper=[[KeychainItemWrapper alloc]initWithIdentifier:identifierForVendor accessGroup:@"hello.lt"];
[keyWrapper setObject:userName forKey:(id)kSecAttrAccount];
[keyWrapper setObject:password forKey:(id)kSecValueData];
}
this is the error:
erminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Couldn't add the Keychain Item.'
thank!