Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImagePicker using Video. Odd Compiler Error

Tags:

iphone

video

I have been trying to get video to work and have been getting an odd issue with a compiler issue. My code looks like this.

 UIImagePickerController * imagePicker = [[UIImagePickerController alloc] init];
    imagePicker.delegate = self;

    NSArray *sourceTypes = [UIImagePickerController availableMediaTypesForSourceType:imagePicker.sourceType];

    imagePicker.sourceType  = UIImagePickerControllerSourceTypeCamera;
    imagePicker.mediaTypes = [NSArray arrayWithObject:(NSString *)kUTTypeMovie];
    [self presentModalViewController:imagePicker animated:YES];
    [imagePicker release];

The compiler Error I am getting says:

Undefined symbols: "_kUTTypeMovie", referenced from: _kUTTypeMovie$non_lazy_ptr in EditViewController.o (maybe you meant: _kUTTypeMovie$non_lazy_ptr) ld: symbol(s) not found collect2: ld returned 1 exit status

I have been working at this for a while and can't figure out where my issue is. I have imported Core Services so I have access to kUTTypeMovie.

like image 968
IphoneDev Avatar asked Dec 09 '22 14:12

IphoneDev


1 Answers

have you tried a call to availableMediaTypesForSourceType: for testing the camera ?

Problem sloved through adding the MobileCoreServices framework and importing it with #import accordingly.

like image 189
Gauloises Avatar answered Dec 21 '22 04:12

Gauloises