Having wasted a morning trying to figure out a very, very odd problem with an iOS app, I felt the need to waste even more time trying to tell the world about it.
You never know, it might help someone
The iOS5 SDK, by default, only builds executables for the armv7 architecture. This is supported by iOS 4.3 and above, but not earlier versions. Previous SDKs have built jointly for armv6 and armv7, covering all versions back to (at least) iOS 3.0.
When building an update to Jigsaw Party, Xcode gave this warning:
To be honest, I skipped over it the first time, alongside a bunch of other warnings from third party libraries like Facebook and AdMob, which haven’t been updated to compile cleanly for iOS5 yet. (OK, let’s be honest, they never compile cleanly…). But Application Loader eventually rejected the app with this same warning.
My hunch on how to get around it was confirmed by a random posting I found on the internet that said “just add armv6 to the build architectures”.
Not really knowing exactly how to do this, I pressed the “+” button in “Architectures”, tapped in “armv6″ and this is how the build settings looked.
No build errors. Hunky dorey. Submitted to Apple and – amazingly – reviewed and approved within hours!
Then the user complaints started.
With the version built and run directly from Xcode, it was all good. With the version from the App Store, crazy things happened! Maths got all broken!
The screenshot below really only shows part of the problem.
As well as the play area not being in the right place (there should be a thin border all the way around, not that big stripe of picture at the bottom), adverts were floating away, sometimes to the middle of the screen, sometimes off screen completely. Pieces were landing in the wrong place. Drop a piece (correctly) in the top right corner, and would ping over to the left side of the screen.
On the iPhone, the advert problem was slightly more apparent.
Apparently I boobed, and Apple’s tools didn’t spot it.
While they were keen to tell me that iOS versions prior to 4.3 needed the armv6 architecture including in the build, they didn’t tell me that 4.3 and above would break nastily if armv7 wasn’t included. I didn’t even realise at first that it wasn’t included, but that setting above should actually have looked like this instead:
The way I did it first time actually said “only build for armv6″. This new way says “do both”. The key is not to touch that tempting little “+” button to add an architecture. That would be too intuitive, obviously. You have to edit what’s already there instead, like this.
Oh hang on, that plus button is a good one
After forcing a release build onto my iPad using both settings, I could finally reproduce the error and resubmit with (a little more) confidence an update that should fix this insanity.
Well, almost. Perfect timing for this wouldn’t you say? …

October 12th, 2011
Chris 






Posted in 