Best practices for iPhone apps on multiple OS versions - iphone

I'm developing an app that uses iOS4 features (like MFMessageComposeViewController), but I want to support iOS 3.1.x as well. I know how to do that in code and build settings, but it's getting hard to find devices to test on--I've upgraded my phone and so have most of my friends. And the simulator with XCode 3.2 doesn't support simulating 3.1 as far as I can tell.
When my apps are raking in money hand over fist, of course I'll invest in multiple devices to test different OS and hardware, but I'm wondering what people do when they're starting out and resources are limited. For example, to test an SMS-capable device with 3.1.x, I'd need not only a spare device, but I'd have to pay for a phone service plan as well.
A couple of things I've considered in the meantime:
Install an older version of XCode and use that simulator for 3.1 testing
Buy a used iPod touch and install OS 3.1 (but couldn't test SMS/GPS)
Other ideas? I'd love to hear what other people are doing.

What I do is keep one of each model of iPhone and iPod touch and install the latest version of the OS that runs on it. So I have iPhone 2G and iPod touch 1G with OS 3.1.3; iPhone 3GS, iPhone 4, and iPod touch 2G with OS 4.0; and a WiFi iPad with OS 3.2. Only one of the phones has cell phone service.
As for my builds, I build with SDK 4.0 and set OS 3.1.3 as the earliest target. If you claim to support a certain OS, you must have tested on the device with that OS.

We have a couple of devices at our startup company, and also have very old iPods. Perhaps you can get some for very little second hand?
OffTopic: I think supporting versions old of an OS when a free update is available shouldn't be done for too long. People need a bit of "help" updating. Must admit that iOS 4 might be an exception though, my iPod doesn't live for long with it installed. :(

Related

iOS 4 for iPhone 4S

I am building an iOS application for public release, and I would like to develop it against iOS 4, as I see from the instapaper stats from November that iOS 5 has a 48% market share, which is good, but my app will probably not be used by these early adopters, and it's probably not going to be enough to force them to upgrade.
The issue is that I only have an iPhone 4S, which shipped with iOS 5. I have been unable to find an iOS build for my 4S, which upon reflection makes sense. Nontheless, I'd like to know if there is some sort of unofficial build for the 4S or some way to make the iPhone 4 version work on the 4S.
I'm pretty sure that the answer is going to end up being "Buy a 3GS/iPod touch for development". Would that necessarily be worth it or should I just tough it out? I'm pretty sure that most iOS 4 users will upgrade eventually. Does anyone have any stats on how long it took iOS 3 users to move on?
I would still suggest getting a used iPhone 3GS. Even if you are able to install iOS 4 on the 4S you still wouldn't be able to do any performance testing, but it's highly likely that someone who still uses iOS 4 has a 3GS.
For your first cut testing, you can use the simulator which, will allow you to test for iOS 4.3
Ideally you need to get hold of the appropriate devices to test your app. You say you're supporting iOS 4, but do you mean 4.2 or 4.3? If 4.2 then you'll be supporting iPhone 3G, if 4.3 then 3GS upwards.
There are testing services out there, just search "iPhone testing services". I've never used them myself, so can't vouch for any of them, but the cost may be less than investing in actual devices.
I kept a 3G and 3GS for testing, but to be honest, even though my main app supports 4.2, I rarely do any testing for older OS versions outside the simulator. I gave the 3GS to my father on condition he tested for me when asked… but of course I had to upgrade it to iOS 5 for him, so it's of little practical value, apart from testing at different screen res.
I would suggest you develop your app with minimum version 4.0 (or other) set. Then you test that on your iOS 5 iphone. I did it with my apps and it works great.
You can test on the lower version simulator or for final testing you could borrow a friend's device or similar.
As I understand (and believe), the compiler would stop you if you included features that are not 4.0 (or the set version) compatible.
Buying lower iOS is not worth it. If you can you should borrow it. In the simulator you can also make the iOS version to lower version to test. Also you can try ad hoc distribution to check how your app performs on other ios before releasing on appstore

How do you test against a specific version when you don't have a device with the version?

I have 3.1.2 device and have used 3.1.2 as minimum iOS requirement for my app.
Now I want to set the minimum iOS requirement for my app to 4.0.
The problem is it seems there's no way I can upgrade my device to 4.0 without jailbreaking.
(and it seems if I jailbreak my device, I won't be able to test IAP)
Hence, I can only update the device's iOS to 5.0, and I won't have 4.0 device to test against.
What do you do when you are in such a situation?
Yes that is a problem, i've faced my self. I still own an iPhone 3G which is still running 4.2.1 and I can down grade it to iOS 4.0 My iPhone 3GS and iPhone 4S are stuck on iOS 5.
I've used testflight to for an open beta to get 20 test with different iOS version, which if it is possible can help a bit. But getting and iPhone 3G or second gen iPod touch might help.
You can install all version of the iOS (up to the one they support) on them since there is real install check done. You might need a tool to finish the installation if it hangs on the final step, but there is no need to jailbreak them.
You may need to buy an old used iOS device running the old OS version which you want to test against. You could sell your other test device with an unusable OS version to help pay for it.

When developing for iOS, which devices do you typically test on?

I'm needing to purchase whatever devices are needed to do testing for iOS applications. My initial thoughts are to test on a first-generation iPod Touch and an iPhone 4. Testing on the old iPod Touch with 3.1 software will give a good indication on how the app will work with little memory, and the iPhone 4 will obviously be a test for the faster system.
What do you all typically test on before submitting an application?
At minimum, a device running the oldest OS that I list as my Deployment Target, the slowest device/OS combo that I have (e.g. a 3G running 4.0.x is likely slower than anything running a 3.x OS) and which the app supports, and the current/latest released OS.
A device which includes all the features that my app will support (e.g. mic, camera, gyro, GPS, etc., if needed.)
Optionally, an iPad if the app is Universal, or if not to see how bad 2X zoom looks.
Optionally, a device with a beta OS installed if it appears Apple is going to release it well before I plan on revising the app.
So far all the apps I've submitted have been compatible with iOS 3.1.x, and I test them on my old 1st gen iPod Touch. I also test on my 3.2.2 iPad and my 4.0.2 iPhone 3GS.
My guess is all of these answers are going to be along the same lines -- test with as wide of a variety of devices as you can that are compatible with your app (i.e. meet the Minimum Deployment Version).
This is especially important if you develop Universal Apps that support 3.1.x. You'll find a ton of bugs with the hardware that you will never get with the simulator.
right now, I test using a 3g running 3.1 (a popular build), a 3gs running 4.0.2 (latest), a touch running 3.1.3(basically 3.1), and an iPhone 4 with 4.0.2.
Mainly try to keep a 3.x device around for sure, and then obviously a device with the most up to date OS.
Based on AdMob reports...around 98% of users are upgraded to atleast 3.0 and those that aren't shouldn't be your client base anyway (unlikely to use new apps).

Iphone Ipad QA testing process

I'm curious about how people test their apps In general.
I recently uploaded an app and wanted to reach as many iOS' as possible so i targeted it to 3.0. I did test on iphone 3, iphone 4 and 3GS but found out that there was an obscure sizing of a button image on a specific ios version.
In general how do you guys test for different versions?
Do people actually keep 3, 3gs and 4. Then on each, do people test on the various versions of ios within each of the phones. Yuck, anything to make this easier?
For the simulator, each xcode download contains only latest os and hardware to target. It would be nice if it could keep older os versions on the simulator to test with, is this possible?
My apps are CPU demanding, so optimizing for each device is big issue for me, so I keep an 3G, 3GS, 4, a 2G iPod Touch, and an iPad around for testing.
It's not always necessary though. Most cases you probably don't have heavy, time critical code, that needs to be optimized, so an iPhone 3GS at a minimum, possibly an iPhone 4 (for high DPI testing, although the simular may be fine for this), and an iPad (if you support it) is all you need.
If you keep your device images in your XCode organizer, you can reflash your device with all the OS version you want to QA on. It really depends on what you need. Unfortunately you can't go back and find older OS versions and install them if you didn't get them before they became out of date (partly because of the checksum process that calls back to Apple after you update to a new version, that attempts to prevent downgrading or upgrading to versions with security holes).

iPhone 2.2.1 to 3.0 Transition Best Practices

Apple is now requiring app developers to submit apps that target 2.2.1 but also build for 3.0. I (and I imagine a large majority of small/part-time developers) only have one iPhone and since the upgrade to 3.0 is irreversible, I wanted to get some thoughts out there as to what are some best practices for minimizing risk during the transition.
I understand there is no foolproof way of doing full regression testing on both OSes, but any thoughts on how one might minimize regressions would be helpful.
Here's Apple's exact text:
Millions of iPhone and iPod touch
customers will move to iPhone OS 3.0
this summer. Beginning today, all
submissions to the App Store will be
reviewed on the latest beta of iPhone
OS 3.0. If your app submission is not
compatible with iPhone OS 3.0, it will
not be approved.
Existing apps in the App Store should
already run on iPhone OS 3.0 without
modification, but you should test your
existing apps with iPhone OS 3.0 to
ensure there are no compatibility
issues. After iPhone OS 3.0 becomes
available to customers, any app that
is incompatible with iPhone OS 3.0 may
be removed from the App Store.
You really can't test on a device against both 2.21 and 3.0 unless you have two devices. If that's really important, you can think about an iPod Touch (assuming your app doesn't require an iPhone).
As far as the simulator, once you install the 3.0 sdk you won't be able to build targeting 2.2.1 any longer. The old 2.2.1 build target gets replaced by a 3.0 target. To support both, you should think about building a virtual machine that retains the 2.2.1 sdk.
However, I agree with Alex... not much need to think about supporting both platforms. 3.0 is solid, and it's clear from today's Apple mail that it's now the major focus, as far as testing & compatibility.
Edit 5/17/09: One thing I learned after this post is that on the Mac, you can't virtualize the Leopard client OS. Apple only allows you to run the server version of OS X in a virtual machine. IMHO, this really limits software developers as a group, among others, and I hope this is changed eventually.
What is your concern about upgrading your phone from 2.2.1 to 3.0? The latest revision seems more or less solid.
I came across this doc on the iPhone Dev Central that might be useful: Technical Note TN2246