views:

675

answers:

8

Now that iPhone SDK 4.0 is available for download, and iOS 4.0 will be available for consumers shortly, does it make sense to start using the new features available in the 4.0 OS?

My primary concern is that using the 4.0 features mandates that end users also update their phones/ipods to 4.0. While this process is pretty painless, is it a reasonable expect most users to update? The application itself doesn't really need anything introduced in the new OS but some of the traditional animation techniques are now "discouraged" in favor of their block-based counterparts. This is fine for me, I'd prefer to use block methods, but I'm concerned that this is a hassle for end users.

So what's the general experience on this? Do you plunge ahead with the latest and greatest or stick with the current version?

p.s. This assumes GM installs of the OS on end users when it is available - not beta.

+1  A: 

I personally usually target one major release behind (i.e., target 3.1 instead of 4.0), that usually gives me a window of "Have you updated your phone in the last year?" But depending on your application, you may be able to make use of multitasking or other features that are only in 4.0. Then, it's a matter of what you think your users will want right away. If you think they can wait a bit, see how things go; if you find a lot of users are moving to 4.0 quickly, then push out your changes.

jer
A: 

Yes, IMO it absolutely makes sense to make use of the new features in OS 4.0. User who have 4.0 installed will have little tolerance for apps that don't support fast app switching (and the higher resolution display of the iPhone 4, too) at the very least.

My primary concern is that using the 4.0 features mandates that end users also update their phones/ipods to 4.0.

That's not true. Supporting the new features does not require you to drop support for older OS versions. Just set the Base SDK to 4.0 and the Deployment Target to 3.x. And make sure your code doesn't call 4.0-specific methods without checking if they exist (respondsToSelector:).

Ole Begemann
I think you may have missed the point. If I'm going to commit to using 4.0 features - that does mandate 4.0 OS. I don't need anything offered by the new OS. The 3.x methods still exist and are supported - they're just "discouraged". I'm not interested in maintaining two separate code bases mingled in the same source file separated by if( ...respondsToSelector: ...) conditions everywhere.
Paul Alexander
It's sometimes necessary to check dynamically whether particular functions and classes are available, too. The iOS platform (and Mac OS X) supports weak linking, but for classes you need to use NSClassFromString because weak class linking is too new for older platforms to support it.
Graham Lee
"The 3.x methods still exist and are supported - they're just 'discouraged'." Short of formal deprecation (of which there is some), nothing you could do under 3.x is in any way "discouraged" now that 4.0 is out. And you can boldly go into whatever new functionality 4.0 offers you, as long as you're sensitive to the blended environment you're going to be running in. I'm building an app that includes daily local notifications. I have to deal with that even at the UI level--I don't even show you that button if your OS doesn't support them.
Dan Ray
+4  A: 

The recommended configuration is to set Base SDK to highest (i.e. 4.0) and Deployment Target to appropriate version (depends what framework feature is used in your app).

Of course, the app can always check OS version and skip calls to un-supported frameworks. It is a common technique to build iPad and iPhone universal apps.

ohho
This is the way to go.
Jeff Kelley
Agreed. And it's not worth an answer in its own right, but the world would be better off with a simple FAQ page on this topic, **particularly** because this is the first iPhone update that's not available to the entire install base.
Justin Searls
This seems logical but you've emphasized 'recommended'. Where is this recommended? Is there an official statement from Apple?
Paul Alexander
@Paul Alexander: Yes, it is inside the `Xcode 3.2.3 Readme`.
ohho
@Horace - I've looked through the "About Xcode and iPhone SDK.pdf" installed with Xcode but didn't seen any guidelines to back this up. What file are you referring to? What page?
Paul Alexander
@Paul Alexander, page 2, What's New section, start with "For iPhone-only ..."
ohho
+18  A: 

It depends. You have at least 3 options and the best way to go depends on your apps requirements:

  1. Your app doesn't require any iOS 4.0 APIs - you should build with BaseSDK 4.0, but set Target Deployment to the minimum version you must have (ie: 3.0).
    Advantages: (1) Your app to run on any device that has at least that Target Deployment version and (2) it will support fast App switching on devices that have iOS 4.0. Disadvantages: You can't use any APIs from after your Target Deployment version.

  2. Your app would be better with 4.0 APIs but it would still be usable without them - if you can conditionally use 4.0 APIs either by providing reduced functionality when on pre iOS 4.0 devices or by providing similar functionality while using different APIs when on pre 4.0 devices, then you can build with BaseSDK 4.0, set Target Deployment to to the minimum version you must have (ie: 3.0) and conditionally use the iOS 4.0 API calls. Advantages: you can run on all devices that have at least your minimum iOS version. Disadvantages: all those conditional calls can get complicated.

  3. Your app requires some iOS 4.0 APIs in order to function - Here you have no choice. Build with BaseSDK 4.0, set Target Deployment 4.0 and use those 4.0 APIs.
    Advantage: code is simpler, no conditionals for iOS version Disadvantages: Your app won't run on iPads yet (they get 4.0 in "Fall 2010"), your app will never run on iPhones earlier than 3G (they don't get 4.0) and some iOS 4.0 features won't work on iPhone 3G.

In all cases, your Base SDK will be 4.0, your Target Deployment will the minimum that you require, and if you need a newer API you can conditionally use it if the device has it.

Just by compiling with BaseSDK 4.0 you will get fast app switching on 4.0 devices even if you don't use any 4.0 features. All apps should at least do that even if they target iOS 2.0. Don't use the 4.0 features if you don't need them and you can target a broader range of older devices and devices that haven't upgraded.

This recent answer on SO summarizes how to do this setup for BaseSDK and Target Deployment and how to conditionally use APIs to target multiple firmware versions.

progrmr
+1  A: 

In my opinion, if you can wait a few months to allow for people to transition into 4.0, then hold off a bit, otherwise just go ahead with the 4.0 features.

Based on my previous years stats, it took over a year for 2.0->3.0 upgrades to happen, but it was mainly the iPod touch users since Apple was charging $10 for it.

I would expect that the 4.0 adoption rate will be much quicker around, but keep in mind that the first gen iPhones/IPods aren't getting a 4.0 upgrade.

5ound
+1  A: 

I think it's safe to expect that the majority of users will upgrade as this is a free upgrade from 3.0. It is fairly obvious that Apple are keen on getting users up on 4.0, which is why it's free.

As with a normal update, iTunes will nag about upgrading, and if you need to reinstall the phone will usually redirect to the latest version.

As you're selling an app, you can be fairly confident that your buyers have internet access, and will at least occasionally dock their phones and get the free update request. People who have updated their phones before are very likely to similarly upgrade to iOS4.

Currently, as I see it, the main motivation to stay on 3.x would be for iPad compatibility.

You should also consider how your sales are expected to look like during the coming 6 months. What is the cost of not using the latest features? Will you be able to shave down on development time or add cutting edge features by going 4.0? Can competing app leverage 4.0 features to get an advantage? Advertising it as 4.0-only might have a positive effect on the perception of the app.

There will be a certain percentage of people who won't be able to run your application because you use 4.0. The trick is to figure out if that loss in sales is bigger or smaller than the gains you get by leaving them behind.

The more buyers you expect, the more worthwhile it is to let all of them run your application. Also, are the buyers likely to be people with computer know-how? If so then they might be even less likely to stay on 3.x.

Also, keep in mind that pre-iPhone 3G phones does not support iOS4.

One more addition:

Apple is already beginning to exclude 2.0 apps from the AppStore, see https://developer.apple.com/iphone/checklist/

Nuoji
+1  A: 

I have found that looking at the numbers of iphones/macs etc with a old vs new OSes installed does not tell you much about the spending habits of their owners.

The people that spend money at the app store are much more likely to have updated OS software.

If your app has any level of complexity, it will take some time to ship, and you will have a pretty small window where the iPad is still running 3.x.

Developing for multiple OS levels is a pain. Besides needing to run your app on iPad/iPhone/iPod, now you have to do it also with 2 operating systems. Miss checking one place where you make a 4.0 only call in rarely executed code and you get crashes.

For the long term stability of your code base, building for 4.0 only on a new app is also good. Simple is better.

Tom Andersen
A: 

progmr has already given a very good answer; one thing worth adding is some hard data:

http://www.appleinsider.com/articles/10/07/22/chitika_ios_4_already_powering_50_of_iphone_traffic.html

ie. 50% of the iphone users (that are installing and using apps with ads in them as of a July 2010) are still running versions prior to 4.0.

JosephH