Swift 3.0 update. Swift 4.0 update.
Let me add something to the discussion ...
In Swift 3 and 4, the delegate method has changed slightly; As he sent you now, there will be no effect and will not be triggered. Happened to me, drove me crazy!
Warning Xcode offers three fixes, but the first two can be misleading. This is just a tiny fix ...
Here the delegate method is fixed for Swift 3 and 4:
func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?) {
However, Victor's answer must be correct / accepted.
Enjoy it!
source share