Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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?

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."

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top