I encountered this error when creating an iOS application for the iPhone. It seems everyone is doing it these days, and we had a unique need to get something to market so I thought why not. I fired up an Intel-based Mac book Pro, obtained the $99 for developer account, and downloaded XCode 4.2. So armed with Google and an entry-level text book, I was off and running.
The app I was coding was a very basic app, I'll admit that. Its not fancy at all and quite text-book in nature, so I was confident I could build it to run on the older iPhone 3g without problems. However I learned that, starting with XCode 4, Apple is trying to nudge developers to code for the newer iPhone 4 platforms by defaulting the architecture to "armv7" only. To build support for the older iPhone 3g, for example, you need to specifically add in support for the "armv6" architecture.
Within the project's Build Settings, in XCode 4.2, the Architectures value defaults to $(ARCHS_STANDARD_32_BIT), which will produce only a "armv7" build. In order to add support for armv6, you must change a few values in the Build Settings:
- Remove $(ARCHS_STANDARD_32_BIT) from Architectures and replace with "armv6 armv7"
- Set Build Active Architecture Only to "No"
- Change Valid Architectures to "armv6 armv7"
As a result, I have come to believe that a large part of being a software developer is simply having the ability to interpret a very cryptic nondescript error to find the solution to a problem in a seemingly unrelated area of your code or project./Users/itguy/Library/Developer/Xcode/DerivedData/BoyneResorts-fnonapqepzdshocfykqbsfmoqugh/Build/Products/Debug-iphoneos/BoyneResorts.app: object file format unrecognized, invalid, or unsuitableCommand /usr/bin/codesign failed with exit code 1
During my experiences building my first iPhone app I also came across a few other links that I found very helpful. First is the Technical Note TN2250 from Apple that steps you through the code signing process. Second is a blog entry over at OopsTechBlog.com which I stumbled upon through my Google searches that condenses all the image sizes and requirements in a nice neat table; very helpful.