I have written a small class that will make your life easier if you need to deploy iOS apps across different versions of the OS and multiple device generations.

You might have already written some code like that to check if the device is running iOS 4.0 and has thus multitasking:

if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_4_0) {
	return YES ;
else {
	return NO ;

While this is valid, it might just be annoying to have to rewrite it every time you need to check it! DDDeviceDetection defines simple class method such as isRunningiOS4 that you can easily call anywhere through your code, assuming you first import the header in your class.

#import "DDDeviceDetection.h"

if ([DDDeviceDetection isRunningiOS4]) {
	// do something that only runs on iOS4

There are many methods checking various hardware and software capabilities such as the OS version, device type, camera, compass, gyroscope, geo-location, audio and video.

You can find the code in my GitHub repository here.