1

I have created a NSObject class KeychainItemWrapper.h / KeychainItemWrapper.m

KeychainItemWrapper.h

Code taken from: https://developer.apple.com/library/ios/samplecode/GenericKeychain/Listings/Classes_KeychainItemWrapper_h.html

KeychainItemWrapper.m

Code taken from: https://developer.apple.com/library/mac/documentation/Security/Conceptual/keychainServConcepts/iPhoneTasks/iPhoneTasks.html

Security.framework already Added

App > Build Phases > Compile Sources: KeychainItemWrapper.m already present

loginViewController.m

KeychainItemWrapper *keychain = [[KeychainItemWrapper alloc] initWithIdentifier:@"BUNDLE_IDENTIFIER" accessGroup:nil];

I am getting 2 errors in above. Please can you help

Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_KeychainItemWrapper", referenced from: objc-class-ref in LoginViewController.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Harshit Gupta
  • 251
  • 1
  • 3
  • 10
  • possible duplicate of [Xcode build failure "Undefined symbols for architecture x86\_64"](http://stackoverflow.com/questions/18408531/xcode-build-failure-undefined-symbols-for-architecture-x86-64) – Kalem Jul 06 '15 at 20:30
  • Make sure you include `KeychainItemWrapper.m` in your target. – rmaddy Jul 06 '15 at 22:26

0 Answers0