I'm getting a serious problem on MFMailComposerViewController
when its entering to the viewcontroller.My project is on cocos2d ios.
[[CCDirector SharedDirector] presentViewController:MC Animated:YES completation:nil];//crashing here
stack trace:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present a nil modal view controller on target >>.'
Before to alloc and present the MFMailComposeViewController check if the device can send mails:
if ([MFMailComposeViewController canSendMail]) {
//your code here
}