Undefined symbols for architecture i386:
"_kUTTypeImage", referenced from:
-[ViewController receiveNotification:] in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm adding a UIImagePickerController to my app and when I go to compile I get the above error. I found a solution on SO:
Symbol not found: kUTTypeImage
Look up the symbol (kUTTypeImage) and locate the image/library it should exist in (MobileCoreServices.framework in this case). Then link your binary with that framework.
Problem is, I'm not sure how to implement it. How do I look up the symbol and then link it to the framework?
Should of noted I already have the MobileCoreServices framework imported. Here's the relevant code:
if ([UIImagePickerController isSourceTypeAvailable:
UIImagePickerControllerSourceTypeCamera]) {
UIImagePickerController* myCamera = [[UIImagePickerController alloc] init];
myCamera.delegate = self;
myCamera.sourceType = UIImagePickerControllerSourceTypeCamera;
myCamera.mediaTypes = [NSArray arrayWithObjects:(NSString *) kUTTypeImage, nil];
myCamera.allowsEditing = NO;
[self presentModalViewController:myCamera animated:YES];
}