here is my code:
//Set
KeychainItemWrapper *keychain = [[KeychainItemWrapper alloc] initWithIdentifier:@"Animex" accessGroup:nil];
[keychain setObject:username forKey:kSecValueData];
[keychain setObject:password forKey:kSecAttrAccount];
[keychain release];
It works perfectly, but I get a warning:
"passing argument 2 of 'set object:forkey' discards qualifiers from pointer target type.
What does it mean?
How to solve?
Cast the parameter to id.
kSecValueData and kSecAttrAccount are CFTypeRef and setObject:forKey: expects an id.
CFTypeRef is defined as:
It’s the fact that it’s a const that’s giving you this warning.