我已经导入了用于从后台应用程序发送电子邮件的框架,即SKPSMTPMessage框架。有人可以建议为什么显示以下错误
SKPSMTPMessage
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
更新 :
答:只需将文件夹拖放到项目上,然后单击复制。那就是选择项目复选框和目标复选框。
如果您的类的 .m 文件未在目标的“构建阶段”选项卡的“编译源”步骤下列出,则可能会出现此类错误。通常 Xcode 会为您执行此操作,但有时它会丢失绘图并且您需要手动添加 .m 文件。
去做这个:
TargetSettings -> Build Phases -> Compile Sources -> 添加你的 .m 类 -> Build and Run