Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Navigating the fragmentation of old/new iOS devices

Tags:

xcode

ios

iphone

I'm having trouble finding some good information regarding development with iOS 5 SDK / XCode 4.2 and being able to support older devices - namely the iPhone 3G.

Essentially I've just started with iOS development and I have downloaded xCode 4.2 which uses the iOS 5 SDK. What I'm concerned about is that I've had a heap of trouble trying to run a vanilla brand new project on my iPhone 3G to test compatibility (i.e. the armv6 problem) It's fairly obvious that Apple want us to be building for the newer hardware, but we hold responsibility when it comes to supporting users of our applications who are still running older hardware. Especially if you want your application to be in as many hands as possible.

For instance, ARC sounds like a god send, but it won't work on iOS versions below 4.3. I've also had good experiences with Storyboards until I tried to install the app on a pre iOS5 device.

Are there any good information sources out there for best practices when trying to support all iOS devices? Is this simply a case of users having to fess up that it's time to get a new iPhone? Or is it a case of developing with the older SDKs until we're just chasing the long tail? Is this question already chasing the long tail?

It's reminiscent in a subtle way of browser standards support fragmentation. Look forward to hearing other peoples thoughts.

like image 637
Chris Avatar asked Nov 04 '22 12:11

Chris


1 Answers

You can lower the Deployment Target in your target's summary settings to support a lesser OS version. The caveat is that the code still compiles to the latest SDK you have installed. This means that you cannot call any methods or use any functionality released after the lowest OS version you wish to support. If you do plan to use new methods for devices that are running a newer version of the OS, you need to surround them with

if ([<class> respondsToSelector:@selector(methodName)] {

}

to make sure the method will run only on devices that support it.

like image 116
James Avatar answered Nov 09 '22 15:11

James