Joakim Sjöstedt
Joakim Sjöstedt

Reputation: 958

What's the workaround for using MFMailComposeViewController after deleting Mail App?

When using MFMailComposeViewController to send mail through an app, an issue arise if the user delete the Mail app and instead use a thid party app to send their mail. What happens is that the mail form shows up, but the send arrow icon is grayed out/disabled:

MFMailcomposeviewcontroller send button is disabled

There is no indication of this to the user.

So what's the workaround here? Is it possible to make other mail services work with MFMailComposeViewController? Or how do I at least tell the users that they need the Mail App? There doesn't seem to be a check for this. The conditional if MFMailComposeViewController.canSendMail() { only checks for a real device being used and a mail account being connected (I think), but it never actually checks if the Mail app even exists.

Upvotes: 0

Views: 310

Answers (1)

Martino Bonfiglioli
Martino Bonfiglioli

Reputation: 1577

Probably if the user decides to delete Mail app because he don't use it and maybe use another mail client like Gmail for example.

So I think you can use Gmail instead of Mail with a deep link like this googlegmail://

Anyway if you really want to restore Mail app you can open the AppStore with Mail app link on order to let the user re-download it

Upvotes: 0

Related Questions