Supporting armv6 and iPhone 5

When I was building Static, one of the things I really wanted to do was support old devices. This goal goes against everything Apple and most Mac/iOS developers will tell you: support the very newest stuff possible. The reality is, however, that people have old devices sitting around, and what better way to breathe new life into them than by installing a noise generator!

So, the goal was to support the devices that were the first mainstream units: iPhone 3G and iPod touch 2nd gen.

Technically, this was very easy to accomplish. Static is pretty simple, and all of the APIs I wanted to use have been available since 4.0 (including background audio, even on the old devices). Yay! I quickly built the app, ran some betas, and got ready to submit. All along the way, I was testing on my personal array of devices, as well as beta testers (including iPhone 5 users). Everything went swimmingly.

Then I tried to submit.

“Trying to fathom why building with iOS 5.0 SDK but including an iPhone 5 launch image would be a problem. Tested on device and it works great, but binary is rejected.” –

Apple had begun rejecting apps built with an older SDK that also included iPhone 5 launch images. Um, what? As it turns out, there are known issues with some UI elements in the OS with these combinations, so Apple quit supporting it. 1

So I started Googling for some answers. I found some crazy hacks,2 and a few good pointers. 3

Here was my simple solution:

  1. Build with Xcode 4.4.1 It supports armv6+armv7 and has reasonable SDK support
  2. Use PlistBuddy to modify Info.plist before signing

The bundle’s Info.plist contains details about how the app was built, including the SDK and tools versions. I grokked these values from an Xcode 4.5 + iOS 6 SDK build, and then dropped them into the script. One of the other ideas I turned up on Google 4 suggested keeping a proper plist around and simply copying during this stage, but that means merging real plist changes back to the copy as well. My approach is easier to maintain in the long term. 5

That’s it. Here’s what my build step looks like:

Build phases for supporting armv6 and iPhone 5

Feel free to reply on Twitter or post back on with any questions or comments.

  1. Hat tip to Peter Steinberger for catching me up on those details.
  2. How to support both armv6 and armv7s for release build in xcode 4.5 – Don’t do this. Seriously.
  3. Building for armv6 in Xcode 4.5 – Interesting, but I didn’t feel like having to maintain a hacked-together version of Xcode
  4. Submit to App Store Using XCode 4.4.1 With iPhone 5 Supported – My approach is based heavily on this, but without maintaining a copy of the plist that has to be merged
  5. The longevity of any of these hacks is admittedly questionable, at best