Search code examples
iosxcodei386

Added Apple's code KeychainItemWrapper.h &.m files into my app and can not run with an error


enter image description here

I want save the username and password when user login, and I added the two Apple's file

in my app, but there is an error and build failed, maybe something about i386 cause this failed.

I using Xcode 4.3.2 and iPhone 5.1 simulator.I dont know what should I do with this error.

Help me, thanks in advance!


Solution

  • You probably have not marked KeychainItemWrapper.m as part of the target, so it's not being compiled. Select the file in the filelist, Open the inspector (the right-hand pane), and make sure that it's assigned to the current target.

    Don't forget that you will also need to link Security.framework.