首先,我的应用程序在iOS 7上运行良好,因为iOS 8无法通过"MFMailComposeViewController“发送应用程序内的电子邮件。出现消息窗口,只显示邮件的主题,并在几秒钟内关闭。我在这里找到了一个描述我的问题的线程,现在我尝试实现来自"Joe“https://stackoverflow.com/a/25864182/4061869的答案。
但我得到了一些错误,一些符号学和解析问题。
最糟糕的事情,根据这部分的解决办法:
Of course have this in your Prefix file
#define APP ((AppDelegate *)[[UIApplication sharedApplication] delegate])
// it's worth noting that is the delegate, not the "application"导致此错误:
未声明标识符“AppDelegate”的使用
有人知道问题出在哪里吗?我根据名称名称.h/.m在'AppDelegate‘上尝试了不同的单词,但是没有任何帮助。
发布于 2014-09-20 22:57:59
您可以在您正在使用的任何ViewController中定义应用程序委托,方法是:
AppNameAppDelegate *APP = [[UIApplication sharedApplication]delegate];显而易见,AppName指的是应用程序的名称。确保也将AppDelegate.h导入到.m文件中。
#import "AppNameAppDelegate.h"为了记录在案,我在MFMailComposeViewController上也遇到了同样的问题,我已经尝试过在post you linked (创建一个全局邮件编写器)中建议的方法,但是它仍然不能使用iOS 8模拟器。显然,它可以在运行iOS 8的物理设备上工作,但我个人还不能证实这一点。
https://stackoverflow.com/questions/25953103
复制相似问题