MFMailComposeViewController不为模拟器链接 [英] MFMailComposeViewController doesn't link for simulator

查看:212
本文介绍了MFMailComposeViewController不为模拟器链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我使用XCode 4.0.2。

First off, I'm using XCode 4.0.2.

好吧,这是我的问题。我可以为MFMailComposerViewController构建Apple示例程序,并在模拟器中运行它(我知道它不会发送电子邮件,我只是担心它构建)。这似乎很好。

Okay, here is my issue. I can build Apple sample program for MFMailComposerViewController and run it in the simulator (I am aware it will not send email, I'm just concerned that it builds). That seems to work fine.

然而,当我尝试在我的应用程序,我得到以下消息。

HOWEVER, when I try to build in my application I get the following message.

ld: warning: ignoring file /Users/lloyd/Projects/iOS/simpleApp/MessageUI.framework/MessageUI, 
    missing required architecture i386 in file
    Undefined symbols for architecture i386: "_OBJC_CLASS_$_MFMailComposeViewController", referenced from:
  objc-class-ref in MailData.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status

解决方案

看Build Settings(基本和组合)我看到我有框架搜索路径设置。这是奇怪的,因为我从来没有记得设置。删除它修正了问题。

Looking "Build Settings" (Basic and Combined) I saw that I had "Framework Search Path" set. This was odd because I never remembered setting that. Deleting it fixed the problem.

我现在可以为模拟器和目标建立。注意:你不能从模拟器发送电子邮件,但你仍然可以运行代码(如果这是有道理的)。

I am now able to build for both the simulator and the target. NOTE: You can NOT send email from the simulator, but you should still be able to run the code (if that makes sense).

推荐答案

解决方案

查看Build Settings(基本和组合)我看到我设置了框架搜索路径。这是奇怪的,因为我从来没有记得设置。删除它修正了问题。

Looking "Build Settings" (Basic and Combined) I saw that I had "Framework Search Path" set. This was odd because I never remembered setting that. Deleting it fixed the problem.

我现在可以为模拟器和目标建立。注意:你不能从模拟器发送电子邮件,但你仍然应该能够运行代码(如果这是有道理的)。

I am now able to build for both the simulator and the target. NOTE: You can NOT send email from the simulator, but you should still be able to run the code (if that makes sense).

这是我的问题的解决方案:)

This was the solution to my problem :)

这篇关于MFMailComposeViewController不为模拟器链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆