Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undefined symbols for architecture i386: _OBJC_CLASS_$_SKPSMTPMessage", referenced from: error

I have imported framework for sending email from application in background i.e. SKPSMTPMessage Framework. Can somebody suggest why below error is shown

Undefined symbols for architecture i386:  "_OBJC_CLASS_$_SKPSMTPMessage", referenced from:   objc-class-ref in ConfirmController.o  "_kSKPSMTPPartContentTransferEncodingKey", referenced from:   -[ConfirmController sendEmail] in ConfirmController.o  "_kSKPSMTPPartMessageKey", referenced from:   -[ConfirmController sendEmail] in ConfirmController.o  "_kSKPSMTPPartContentTypeKey", referenced from:   -[ConfirmController sendEmail] in ConfirmController.o  ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status 

Source from which framework is taken:-

Locking the Fields in MFMailComposeViewController

Update:

Answer:Just drag and drop folder over the project and click copy. Thats it select project check box and target check box as well.

like image 930
Mann Avatar asked Aug 08 '11 15:08

Mann


2 Answers

You can get this type of error if your class' .m file is not listed under the "Compile Sources" step of the "Build Phases" tab of your target. Normally Xcode does this for you, but sometimes it loses the plot and you need to add the .m file manually.

To do this:

TargetSettings -> Build Phases -> Compile Sources -> add your .m class ->Build and Run

like image 101
Allen Pike Avatar answered Oct 13 '22 12:10

Allen Pike


for me the issue turned out to be missing frameworks. Once I added em, it worked.

like image 29
verma Avatar answered Oct 13 '22 13:10

verma