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.” –https://alpha.app.net/thaddeus/post/1766801
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.
So I started Googling for some answers. I found some crazy hacks, and a few good pointers.
Here was my simple solution:
- Build with Xcode 4.4.1 It supports armv6+armv7 and has reasonable SDK support
- 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 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.
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 App.net with any questions or comments.