I get this error while trying to build for iphone simulator:
d: warning: ignoring file /users/salehshah/SmartSwipe/libANMobilePaymentLib.a, file was built for archive which is not the architecture being linked (i386) Undefined symbols for architecture i386:
Please note that i am using xcode 4.2 with iOS 5. Project builds and runs fine on device. I think there is some problem while linking the static library. May be it is problem with the architectures.
The static library you are linking is not compiled for the simulator. If this is a precompiled library you would want to create a version, that includes all three iOS architectures armv6 armv7 and i386. You can do so by compiling every single architecture on their own and then linking them together using lipo see
man lipoIf on the other hand you are compiling the library as a dependency of your app target, something is wrong with your build settings. Have a look a the libraries build settings, namely the
ARCHSand theVALID_ARCHS