Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undefined symbols for architecture i386: "_OBJC_CLASS_$_MFMailComposeViewController"

Tags:

xcode

ios

I train in the creation of programs for the iPhone using MFMailComposeViewController. However, an error occurs when compiling:

Undefined symbols for architecture i386:
   "_OBJC_CLASS_ $ _MFMailComposeViewController", Referenced from:
       objc-class-ref 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)

Please help, what is it? And how to fix it?

Thanks in advance!

like image 792
Denis Vorobyov Avatar asked May 31 '12 17:05

Denis Vorobyov


2 Answers

You must add the MessageUI.framework framework to you project.

Here's how you do it:

  • Select the project in the project navigator sidebar.
  • Click on the "Build Phases" tab.
  • Expand the "Link Binary With Libraries" section.
  • Click the '+' button.
  • Choose 'MessageUI.framework' from the list. (You can use the search box to find it).
like image 118
idz Avatar answered Nov 16 '22 02:11

idz


You likely do not have the necessary imports:

MessageUI.framework

How you add them can be found here importing framework

like image 40
rooster117 Avatar answered Nov 16 '22 02:11

rooster117