You should always check wether a source type is available:
From the Apple UIImagePickerController
doucmentatiom
Verify that the device is capable of picking content from the desired source. Do this calling the
isSourceTypeAvailable:
class method, providing a constant from theUIImagePickerControllerSourceType
enumeration.
Check wether the source is available like:
if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypePhotoLibrary]) {
// UIImagePickerControllerSourceTypePhotoLibrary is available.
}