Post

Replies

Boosts

Views

Activity

Blank Emails from MFMailComposeViewController
I use a MFMailComposeViewController in my apps to get feedback from customers via email. The problem I'm having is that every single email that I get sent from customers via my app has an empty email body. There is nothing on Stack Overflow or other sites regarding this issue and I can't figure out what the issue is here. Email Title: App Question Email Body: 发自我的 iPhone Code I'm using: func configuredMailComposeViewController() -> MFMailComposeViewController { let mailComposerVC = MFMailComposeViewController() mailComposerVC.mailComposeDelegate = self var emailAddresses : [String] = [] emailAddresses.append("support@appwebsite.com") mailComposerVC.setToRecipients(emailAddresses) mailComposerVC.setSubject("App Question") return mailComposerVC } func showSendMailErrorAlert() { let sendMailErrorAlert = UIAlertController(title: "Could Not Send Email", message: "Your device could not send e-mail. Please check e-mail configuration and try again.", preferredStyle: UIAlertController.Style.alert) self.present(sendMailErrorAlert, animated: true, completion: nil) } func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?) { controller.dismiss(animated: true, completion: nil) }
0
1
234
Aug ’23
Unwind Segue Doesn't Work
Here is my code below. I keep getting the error: "Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior". Everywhere online says this code will work. Thoughts on why it doesn't work? let alert = UIAlertController(title: "Alert: iCloud Disabled", message: "Go into Settings -> iCloud -> iCloud Drive and switch iCloud Drive to On.", preferredStyle: UIAlertControllerStyle.Alert) let OKAction = UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: { (_)in self.networkAlertDisplayed = true self.performSegueWithIdentifier("unwindToController1", sender: self) }) alert.addAction(OKAction) self.presentViewController(alert, animated: true, completion: nil)What do I need to do to get this code working?
17
0
5.6k
Mar ’16