iOS simulator on mac is running i386 architecture, not armv7?

KaiserJohaan picture KaiserJohaan · Oct 24, 2011 · Viewed 15k times · Source

I've got some static libraries I've built for use on armv7 architectures. When I try to use them in a iOS project which I testrun on the iphone 5.0 simulator, I get errors telling me about undefined symbols for architecture i386 in my static libraries.

So I guess this means the iphone simulator wants libraries compiled for i386? What is the point of the simulator then - why dosn't it emulate armv7 architecture as well?

So the only way I can test my static libraries is to connect a physical iOS device and run it?

Or did I get it wrong?

Answer

jrturton picture jrturton · Oct 24, 2011

So I guess this means the iphone simulator wants libraries compiled for i386? What is the point of the simulator then - why dosn't it emulate armv7 architecture as well?

You've answered your own question. It's a simulator, not an emulator. Therefore it is a Mac OSX program, running on i386 architecture. If you compile your static libraries for i386 as well you will be able to use them on the simulator.