title: iOS Undefined symbols for architecture i386: "_kUTTypeImage"
body: <pre><code>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)
  </code></pre>
  
  <p>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:</p>
  
  <p><a href="https://stackoverflow.com/questions/10144961/symbol-not-found-kuttypeimage">Symbol not found: kUTTypeImage</a></p>
  
  <blockquote>
    <p>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.</p>
  </blockquote>
  
  <p>Problem is, I'm not sure how to implement it. How do I look up the symbol and then link it to the framework? </p>
  
  <p>Should of noted I already have the MobileCoreServices framework imported. Here's the relevant code:</p>
  
  <pre><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];
  
              }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/mQpc4.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/mb6Wc.png" alt="enter image description here"></p>