MFMailComposeViewController in visionOS does not have a cancel button

When i use the MFMailComposeViewController in visionOS, there is no cancel button for the controller. The button at the bottom closes the app. Is anyone else experiencing this?


    if([MFMailComposeViewController canSendMail]) {
        MFMailComposeViewController* controller = [[MFMailComposeViewController alloc] init];
        controller.mailComposeDelegate =  (id <MFMailComposeViewControllerDelegate>)view;
        [controller setToRecipients:toAddresses];
        [controller setSubject:subject];
        [controller setMessageBody:body isHTML:isHtml];
        [view presentViewController:controller animated:YES completion:nil];
    }


Answered by HiddenJester in 878552022

Did anyone file a bug about this? If so, please post the bug number.

Hi Quinn,

I can confirm this is still happening in vision 26.2 & 26.3. I created a sample app with iOS, Mac (Catalyst), and visionOS targets and attached it to a Feedback. The bug number is FB22140603.

Same exact issue here, I think this is a bug on Apples side. Any workarounds to fix this?

same issue +1, hope for fix

Did anyone file a bug about this? If so, please post the bug number.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Did anyone file a bug about this? If so, please post the bug number.

Hi Quinn,

I can confirm this is still happening in vision 26.2 & 26.3. I created a sample app with iOS, Mac (Catalyst), and visionOS targets and attached it to a Feedback. The bug number is FB22140603.

The bug number is FB22140603.

Thanks!

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Since iPadOS 26.4, I'm also missing the Cancel-Button on iPad. Is this a bug or intentional?

I've filed FB22313288.

Is this a bug or intentional?

I’d call it a bug, by my opinion doesn’t matter (-: If this is causing your product significant grief then it’s worth filing a bug about, even if it’s intentional.

I've filed FB22313288.

Thanks. It’s been marked as a duplicate of a bug that was filed internally, one that’s definitely with the right folks. I don’t have any info to share beyond that.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Do you have now anything to share about this bug or its fix? Unfortunately, it is still present in iPadOS 26.5. :-(

As this thread is actually about visionOS, the corresponding iPadOS thread is there: https://developer.apple.com/forums/thread/821300

Do you have now anything to share about this bug or its fix?

No.

Unfortunately, it is still present in iPadOS 26.5. :-(

That’s my understanding as well )-:

If you want to be notified if and when the bug is fixed, you should file your own bug and ask that it be marked as a duplicate of our internal bug (r. 172868867). See Bug Reporting: How and Why? for more about how that process works.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

It's starting to drift off topic, but I was less sure if it was a bug on iPadOS, where the popover dismissal seems to more commonly be "tap outside the popover to cancel". The difference on visionOS, IMO, is that tapping outside the mail compose controller doesn't do anything and it modally blocks the window it was presented from until you send the email or force-quit the entire app.

TL;DR: the iPad behavior read to me like expected behavior for the platform. I put a visionOS specific workaround in my app, but didn't bother on iPadOS, since there is a platform specific "dismiss this popup" verb and it works as expected. I guess that would be less true if the mail controller was presented fullscreen though …

The issue on iPadOS is you cannot close the compose dialog at all if you have set isModalInPresentation: The user has to force-close the whole app. And not setting isModalInPresentation isn't practical on iPadOS, as every unintentional touch outside the compose dialog closes the compose dialog. And it is way too easy to touch the region outside the compose dialog. In addition, every time the user closes the compose dialog this way, a new mail draft is added to the users mail account. With the "Close" button, you'll be given the option to save or delete the draft instead.

MFMailComposeViewController in visionOS does not have a cancel button
 
 
Q