Overall my app works on all iOS device however I have a feature that only works on iPhone 4's therefore if the user does not have an iPhone 4 I'd like to display an alert letting them know that this feature won't work on their device?
How can I do that?
I'm trying to check if the device has the camera-flash
Have you tried the various UIDevice methods? That said, there's most likely an easier way, depending on what specific feature your optional functionality requires, but without knowing what this is it's hard to give a concrete example.
N.B.: I'd also recommend not presuming a feature set based on the detected device itself for reasons of future compatibility.
UPDATE
In terms of the camera flash, I know you can use the UIImagePickerController's isFlashAvailableForCameraDevice: method. (You'll probably want to call this after first verifying the existance of a camera via the isCameraDeviceAvailable: method.)