I just tried to use the KeychainItemWrapper provided by Apple, but I'm getting a linking error each time:
Undefined symbols for architecture i386: "_OBJC_CLASS_$_KeychainItemWrapper", referenced from: objc-class-ref in DataModel.o
ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've included the Security framework and checked why Apple included in the Xcode project, but I can't seem to find what else is going wrong.
_keychain = [[KeychainItemWrapper alloc] initWithIdentifier:@"com.website.project" accessGroup:nil];
[_keychain setObject:_username forKey:(id)kSecAttrAccount];
[_keychain setObject:_password forKey:(id)kSecValueData];
I also added "com.website.project" to my Keychain Access Groups.
Be sure the KeychainItemWrapper is in the "Compile Sources" list.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With