When building libraries, frameworks or applications for iOS, XCode will only compile object code for the architectures specified in the build settings for the target. XCode will also only link to binaries that have the specified architecture built in.
In XCode if you select your target you can see under the build settings tab, the architecture for your target. It will contain values like arm6, arm7, and i386.
When running code in the iOS simulator you are running your code on your desktop which is the i386 architecture.
When running on the device the binary has "slices" which are built for that architecture.
If the correct architecture "slice" is not present in the binary, it will not run.
If you get the missing i386 architecture error running an iOS application in the simluator you need to make sure that your application and all its dependent libraries have been built for i386 architecture.
Also check that "build active architecture only" is set to NO in the build settings for the target.
If you cant rebuild dependent libraries because you dont have the source, you will have to test on a device supporting arm6 or arm7 architecture.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…