ImagePicker using video. Even Compiler Error

I am trying to get the video to work and getting a weird problem with the compiler problem. 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];

Compiler error I get:

Undefined characters: "_kUTTypeMovie", reference: _kUTTypeMovie $ non_lazy_ptr in EditViewController.o (you probably mean: _kUTTypeMovie $ non_lazy_ptr) ld: character not found collect2: ld returned 1 exit status

I worked on this for a while and cannot figure out where my problem is. I imported the main services, so I have access to kUTTypeMovie.

+3
source share
1 answer

Have you tried calling availableMediaTypesForSourceType: to test the camera?

MobileCoreServices #import .

+13

Source: https://habr.com/ru/post/1758377/


All Articles