when i try to use UIImagePickerController to select a video from camera roll in the iOS-Simulator of XCode 5, i get the aforementioned error. this is the output:
2013-11-02 21:28:44.788 Imagepicker[89146:1403] 21:28:44.788 ERROR: 185: Error creating aggregate audio device: 'what'
2013-11-02 21:28:44.788 Imagepicker[89146:1403] 21:28:44.788 WARNING: 219: The input device is 0x32; 'AppleHDAEngineInput:1B,0,1,1:2'
2013-11-02 21:28:44.789 Imagepicker[89146:1403] 21:28:44.789 WARNING: 223: The output device is 0x28; 'AppleHDAEngineOutput:1B,0,1,2:0'
2013-11-02 21:28:44.790 Imagepicker[89146:1403] 21:28:44.790 ERROR: 398: error 'what'
2013-11-02 21:28:44.791 Imagepicker[89146:a0b] 21:28:44.791 ERROR: 398: error -66680
2013-11-02 21:28:44.791 Imagepicker[89146:a0b] 21:28:44.791 ERROR: 398: error -66680
2013-11-02 21:28:44.792 Imagepicker[89146:a0b] 21:28:44.792 ERROR: 398: error -66680
2013-11-02 21:28:44.792 Imagepicker[89146:a0b] 21:28:44.792 ERROR: 398: error -66680
my code is:
imagePicker = [[UIImagePickerController alloc] init];
imagePicker.mediaTypes =[[NSArray alloc] initWithObjects: (NSString *) kUTTypeMovie,kUTTypeVideo,kUTTypeImage, nil];
[imagePicker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
[imagePicker setDelegate:self];
[self presentViewController:imagePicker animated:YES completion:nil];
the image picker shows up, shows a preview with cancel, play and choose button and a dialog that says "The operation could not be completed". after pressing "OK" (the only button), the preview freezes.
-(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
never gets called. it all works fine with images.
I've had exactly the same problem with the latest toolchain, but the following fixed it for me;
On the simulator Hardware menu, select TV Out->640x480.
Attempt to launch your app from Xcode, it may fail with a springboard error.
On the simulator Hardware menu, select TV Out->Disabled.
After that the ImagePickerController should now work as expected.
"iOS simulator" -> "Reset content and settigs..." solved similar problem in my case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With