views:

82

answers:

3

I've developed an iPhone application for an iOS Deployment Target 3.2.

But my client changed his mind and would like the app to be available for iOS 3.1. Thus, i've set iOS Deployment Target 3.1 and left base SDK to 4.0 but everything compiles fine whereas I'm sure I use methods and classes introduced in iOS 3.2 only.

How can I identify my code that won't run on a 3.1 device ? (and may cause an application crash)

My problem is that I have a single iPhone device (with 4.0.2 installed) and that SDK 3.1.x are not provided by XCode anymore.

A: 

Have you checked the warnings too? If a selector is not found then it will compile but may give you a warning that matching selector is not found or something similar. You said that you are sure that you have used >=3.2 things. Don't you know what are they?

taskinoor
I've checked warnings but they're just relative to the base SDK (ie 4.0).
Dirty Henry
I've identified classes that are >=3.2 (MPMoviePlayerViewController for instance), but I'd like to find a way to be 100% sure not to forget anything in the application.
Dirty Henry
Can you change base SDK to 3.1? I'm not 100% sure whether it will help or not.
taskinoor
That was my next question. Current versions of XCode on Apple's website only provide 3.2 base SDK. How can I use a 3.1 base SDK again ? Can it be downloaded from any site ?
Dirty Henry
opps. im not aware of that. im still using sdk 3.0.
taskinoor
A: 

The only way you can be sure that your application will work on a device running 3.1 is to test it on a device running 3.1. The same goes for support of older (pre-iPhone 3G S) hardware. I've seen far too many applications on the store that were clearly tested only on a newer device and which bog down or run out of memory on older hardware. If you don't support that hardware, great, just set your Info.plist appropriately to not make it available to those devices.

No matter how thoroughly you think you've checked for newer methods and classes, you can still run into subtle issues. For example, you may or may not need to weak link certain frameworks or your application will crash on older OSs, even if you don't use any new APIs.

Older model iPod touches are cheap on eBay and can be downgraded to the older OS versions if 4.0 has been installed on them. Alternatively, you can find someone with a device running an older OS version and send them an ad hoc build of the application to test. This is less desirable, because you'll want to hook up Instruments to the device to make sure memory usage is not getting too close to the danger area on the older device.

I'm sorry, but that's the only way to be sure. As another developer said to me, "If you haven't tested it on a specific OS version or device, consider your application to not run there."

Brad Larson
I 50% agree with you :) As compilation tools are not enough, I think testing is not enough either. You need both test AND compilation tools to provide a way to be 100% sure of the quality of your application. That's why I'm now looking for a 3.1 base SDK for iOS which is not provided in current Xcode downloads from Apple website. How can I get an old 3.1 SDK ?
Dirty Henry
+1  A: 

Henry, this might help you: install the old xcode & sdk parallel to the new one. Links to the old SDKs can be found here: http://iphonesdkdev.blogspot.com/2010/04/old-versions-of-iphone-sdk.html

hope, that was what you wanted.

Jan Greve
Awesome! That's what I wanted!
Dirty Henry