我引用了这个website ,我的框架文件中有 MessageUI.framework
,我也将其更改为可选。但我仍然收到以下错误:
ld: warning: in /Users/mb/Desktop/tese/MessageUI.framework/MessageUI, missing required architecture i386 in file Undefined symbols:
"_OBJC_CLASS_$_MFMessageComposeViewController", referenced from: objc-class-ref in OnlyForTest.o ld: symbol(s) not found collect2: ld returned 1 exit status
我是初学者,英语不太好,所以请使用简单的单词,谢谢您的回复。
最佳答案
MessageUI.framework
仅适用于设备,不适用于模拟器。关于缺少所需架构 i386
的部分表示您正在尝试在模拟器上使用它。
如果您想避免模拟器崩溃,请添加以下检查:
if ([MFMessageComposeViewController canSendText]) {
// do the display part
}
关于ios - xcode 上的短信(有 MessageUI.framework),但仍然失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8162023/