You don't want to get rid of this error, you want to fix it.
The problem here is that you're linking a simulator version of your library into the device build of your app. The simulator wants libraries in the i386 architecture, and the device wants things in the armv6 or armv7 architecture.
So the solution here is to link the correct version of your library.
What I usually do is combine them into a single library and let the linker pick the right version for me. Here's what you do in Terminal:
$ cd /path/to/my/libraries
$ ls
libMyLibrary-Device.a
libMyLibrary-Simulator.a
$ file libMyLibrary-Device.a
libMyLibrary-Device.a: Mach-O universal binary with 2 architectures
libMyLibrary-Device.a (for architecture armv6): current ar archive random library
libMyLibrary-Device.a (for architecture armv7): current ar archive random library
$ file libMyLibrary-Simulator.a
libMyLibrary-Simulator.a: Mach-O universal binary with 1 architecture
libMyLibrary-Simulator.a (for architecture i386): current ar archive random library
$ lipo -create -output libMyLibrary.a libMyLibrary-Device.a libMyLibrary-Simulator.a
$ ls
libMyLibrary-Device.a
libMyLibrary-Simulator.a
libMyLibrary.a
$ file libMyLibrary.a
libMyLibrary.a: Mach-O universal binary with 3 architectures
libMyLibrary.a (for architecture armv6): current ar archive random library
libMyLibrary.a (for architecture armv7): current ar archive random library
libMyLibrary.a (for architecture i386): current ar archive random library
Then you just link libMyLibrary
instead of the device or simulator version, and the linker will do the right thing.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…