title: Select videos using UIImagePickerController in 2G/3G
body: <p>I am facing a problem where-in I cannot select videos from the photo album in iPhone 2G/3G device. The default photos application does show videos and is capable of playing them, which in turn means that UIImagePickerController should clearly be capable of showing videos in photo album and selecting them.</p>
  
  <p>I have coded this to determine whether the device is capable of snapping a photo, recording video, selecting photos and selecting videos:</p>
  
  <pre><code> // Check if camera and video recording are available:
   [self setCameraAvailable:NO];
   [self setVideoRecordingAvailable:NO];
   [self setPhotoSelectionAvailable:NO];
   [self setVideoSelectionAvailable:NO];
  
   // For live mode:
   NSArray *availableTypes = [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypeCamera];
   NSLog(@"Available types for source as camera = %@", availableTypes);
   if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
   {
    if ([availableTypes containsObject:(NSString*)kUTTypeMovie])
     [self setVideoRecordingAvailable:YES];
    if ([availableTypes containsObject:(NSString*)kUTTypeImage])
     [self setCameraAvailable:YES];
   }
  
   // For photo library mode:
   availableTypes = [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
   NSLog(@"Available types for source as photo library = %@", availableTypes);
   if ([availableTypes containsObject:(NSString*)kUTTypeImage])
    [self setPhotoSelectionAvailable:YES];
   if ([availableTypes containsObject:(NSString*)kUTTypeMovie])
    [self setVideoSelectionAvailable:YES];
  </code></pre>
  
  <p>The resulting logs for 3G device is as follows:</p>
  
  <pre><code>2010-05-03 19:09:09.623 xyz [348:207] Available types for source as camera = (
      "public.image"
  )
  2010-05-03 19:09:09.643 xyz [348:207] Available types for source as photo library = (
      "public.image"
  )
  </code></pre>
  
  <p>As the logs state, for photo library the string equivalent of kUTTypeMovie is not available and hence the UIImagePickerController does not show up (or rather throws exception if we set the source types array which includes kUTTypeMovie) the movie files in photo library.</p>
  
  <p>I havent tested for 3GS, but I am sure that this problem does not exist in it with reference to other threads.</p>
  
  <p>I have built the app for both 3.0 (base SDK) and 3.1 but with the same results.</p>
  
  <p>This issue is already discussed in the thread:
  <a href="http://www.iphonedevsdk.com/forum/iphone-sdk-development/36197-uiimagepickercontroller-does-not-show-movies-albums.html" rel="noreferrer">http://www.iphonedevsdk.com/forum/iphone-sdk-development/36197-uiimagepickercontroller-does-not-show-movies-albums.html</a></p>
  
  <p>But it does not seem to host a solution.</p>
  
  <p>Any solutions to this problem?</p>
  
  <p>Thanks and Regards,
  Raj Pawan</p>