Hey guys my question is i want to detect if my user is using a iPhone 4 (For its camera flash) or any other iDevice .I know how to detect what version of iOS. or how would i detect the device has camera flash capabilities .
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s best to simply check for the specific features you require, rather than attempt to speculate based on the device. (Otherwise future devices will require you to edit your code.)
In terms of the camera flash, you could for example use the the UIImagePickerController‘s
isFlashAvailableForCameraDevice:method. (You’ll probably want to call this after first verifying the existance of a camera via theisCameraDeviceAvailable:method) or theisFlashModeSupported:method within the AVCaptureDevice Class.