views:

26

answers:

1

Hello, I wrote a code that utilizes the MFMAilComposibleViewController to harness in-app emails. I specified the delegate as so under, but my delegate method isn't getting called. This is the first time I'm getting this type of error; I normally develop under the iPhone but for a client I need to develop under an iPad.

MFMailComposeViewController *mailComposer = [[MFMailComposeViewController alloc] init];

[mailComposer setModalPresentationStyle: UIModalPresentationFormSheet];

[mailComposer setSubject: @"Hello World"];

[mailComposer setMailComposeDelegate: self];

[mailComposer setMessageBody: @"<font color='red'>Hello</font> <font color='blue'>World</font>" isHTML:YES];

[self presentModalViewController: mailComposer animated: YES];

This snippet is an exact copy-paste of the method that calls the mailview. Please note, I did specify in my header the MFMailViewControllerDelegate protocol.

Thank You!

A: 

Have you tested this in simulator? As i've experienced before, the mail composer doesn't work in the simulator but in the device. Try it.

devb0yax
Oh ok. That would explain a lot, all of my testing is currently done only on the simulator; no device with me at the moment.Thanks!
G33kz0r