tags:

views:

90

answers:

3

A few months ago I got an shocking email from Apple, telling that they will reject every app that is not built against iOS 4.x SDK. Now I wonder if:

1) is this a bad joke?

2) if not: does that mean that my app will only run on the very lates devices like iPhone4, iPod touch 4, or any device that has iOS 4.x installed?

I downloaded the latest iOS SDK and I can only build against 3.2 or 4.1, where I believe 3.2 is only for iPad. Now I can either throw away my 6 iPod touches with older OS installed or I'm lucky and there's still a way to code for them without upgrading them all to 4.1.

What do you think? What's the truth?

+2  A: 
  1. No it's not, it's "the law according to Apple".
  2. No it does not. There's a setting called "deployment target" which you can set iOS 3.0 or later versions. Use it. But you must build against the iOS 4 SDK.

The truth is what Apple says, and what I've just clarified above. :)

jer
Can you go into detail how to set that deployment target? And what exactly does that mean? Does Xcode tell me when I use methods that are not available in iOS 3.0, for example?
openfrog
The SDK documentation tells you when an API became available, and when it was (if it has been) deprecated. `command-option-double click` on a method to bring up the inline documentation for that method. Also, in your build settings for your target, you can find "Deployment Target" in there. It has a drop down list, pick one.
jer
A: 

You can still develop for older devices. You just need to set the deployment target to the older iOS version you support. You have to build agains the most recent SDK however.

You can find more information on the official documentation.

gcamp
"building against most recent SDK" means to set the Base SDK to something high?
openfrog
+1  A: 

A few months ago I got an shocking email from Apple, telling that they will reject every app that is not built against iOS 4.x SDK. Now I wonder if:

1) is this a bad joke?

No, but it's a good thing.

First, it encourages developers to keep using the most up-to-date SDK.

Second, it encourages users to update to the latest firmware. (Fewer bugs, more stability, less security holes).

Third, it presents you a fixed target you have to worry about when it comes to submitting your app. If Apple tested against every version of iOS, it would take forever for apps to be approved, and you'd end up getting all sorts of little bugs on specific versions of firmware on specific devices. It would be madness.

2) if not: does that mean that my app will only run on the very lates devices like iPhone4, iPod touch 4, or any device that has iOS 4.x installed?

You can set the Deployment Target in the build settings for whatever you want, but I'd recommend no lower than 3.1.x for any app. Because of (1), most users are using 4.x, with a small percentage using 3.x, and virtually no one running 2.x or 1.x.

I downloaded the latest iOS SDK and I can only build against 3.2 or 4.1, where I believe 3.2 is only for iPad. Now I can either throw away my 6 iPod touches with older OS installed or I'm lucky and there's still a way to code for them without upgrading them all to 4.1.

If you have an older iPod Touch (as I do -- 1st gen) keep it around (with 3.1.3) for testing your apps. Don't throw it out.

Shaggy Frog
an you go into detail how to set that deployment target? And what exactly does that mean? Does Xcode tell me when I use methods that are not available in iOS 3.0, for example? (Yep, I have every iPod touch generation here... guess developers are Apples best customers)
openfrog
You set the Deployment Target in the build settings for the project: Get Info on your project and click on the "Build" tab. It specifies to the device the minimum version of iOS that must be on the device, for the device to run the app. Xcode does not tell you what methods are in 3.0 unless those methods are deprecated. You have to weak-link the UIKit library and then go through your code to check, as well as test thoroughly.
Shaggy Frog