Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

KeychainItemWrapper linking error

Tags:

ios

keychain

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.

like image 305
woutr_be Avatar asked May 16 '12 02:05

woutr_be


1 Answers

Be sure the KeychainItemWrapper is in the "Compile Sources" list.

like image 50
CodaFi Avatar answered Sep 18 '22 12:09

CodaFi