MFMailComposeViewController 不链接模拟器

发布于 2024-11-06 03:22:19 字数 720 浏览 3 评论 0原文

首先,我使用 XCode 4.0.2。

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

然而,当我尝试构建我的应用程序时,我收到以下消息。

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

解决方案

查看“构建设置”(基本和组合),我发现我设置了“框架搜索路径”。这很奇怪,因为我从来不记得设置过它。删除它解决了问题。

我现在可以为模拟器和目标进行构建。注意:您无法从模拟器发送电子邮件,但您仍然应该能够运行代码(如果有意义的话)。

First off, I'm using XCode 4.0.2.

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

SOLUTION

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).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

一口甜 2024-11-13 03:22:19

在 Xcode 中,转到目标的构建阶段选项卡。确保您看到 MessageUI.framework。如果不存在,请单击 + 添加新框架。

In Xcode go to the build phases tab for your target. Make sure you see MessageUI.framework. If it's not there click + to add a new framework.

梦幻的心爱 2024-11-13 03:22:19

解决方案

查看“构建设置”(基本和组合),我发现我设置了“框架搜索路径”。这很奇怪,因为我从来不记得设置过它。删除它解决了问题。

我现在可以为模拟器和目标进行构建。注意:您无法从模拟器发送电子邮件,但您仍然应该能够运行代码(如果有意义的话)。

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

SOLUTION

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 :)

等风也等你 2024-11-13 03:22:19

添加 MessageUI.framework 尽管文档这么说不是必须的。

Add MessageUI.framework although the docs said it is not a must.

糖粟与秋泊 2024-11-13 03:22:19

将 MessageUI.framework 添加到项目链接的框架和库

Add MessageUI.framework to the project Linked Frameworks and Libraries

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文