tags:

views:

41

answers:

1

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.

A: 

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

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

Gauloises
yes, I did. if I comment out the line with kUTTypeMovie I get no compiler error.
IphoneDev
With #import <MobileCoreServices/MobileCoreServices.h> and the according Framework added, i get no compiler errors.
Gauloises
Forgot to add the framework. Thank you! Could you please include that in your original answer and I will mark it as the best answer for this question.
IphoneDev
i got problem of compressing video can you help me to solve it
GhostRider