Unable to deploy on real device: libiPhone-lib.a is buit for another architecture

I’m trying to deploy Penelope demo on a real device and given the same error as on this thread (but for different architecture):
http://forum.unity3d.com/threads/53288-File-format-which-is-not-the-architecture-being-linked-(i386

ld: warning: in /Volumes/MacExtra/Projects/Unity/penelope/demo-ios/Libraries/libiPhone-lib.a, file was built for unsupported file format which is not the architecture being linked (armv7)
<…many undefined symbols failed to link…>

I’ve built the project of iOS, selected Base SDK = 4.2 and loaded the project into XCode 4. I had to change the architecture i386 → Standard(arm6+arm7) in order for the build to start. I connected the device (iPhone 4), set up the build target to it and hit the Build&Run button.

As far as I understand, it fails to link against “libiPhone-lib.a”. The question is: what architecture is this lib built for and why is it not for arm6/arm7 ?

sounds like you choose in unity to build a similator project and now try to deploy to device which will not work
you need to switch to the real OS in the player settings so 4.2 instead of 4.2 simulator etc

Hi dreamora,

Thanks for a quick answer. And you are perfectly correct - I had iOS 4.2 simulator SDK chosen in Unity.
Now everything works! Thank you!

glad to hear :slight_smile:
wish you lots of fun experimenting with the applicaiton on the real thing :slight_smile: