Questions tagged [messageui]

The Message UI framework is a framework for iOS that provides specialized view controllers for presenting standard composition interfaces for email and SMS text messages.

The Message UI framework is a framework for iOS () that provides specialized view controllers for presenting standard composition interfaces for email and SMS text messages.

To use the framework, you must add MessageUI.framework to your Xcode project and link against it in any relevant targets. To access the classes and headers of the framework, include an #import <MessageUI/MessageUI.h> statement at the top of any relevant source files.

Documentation:

120 questions
77
votes
13 answers

SwiftUI: Send email

In a normal UIViewController in Swift, I use this code to send a mail. let mailComposeViewController = configuredMailComposeViewController() mailComposeViewController.navigationItem.leftBarButtonItem?.style =…
Khant Thu Linn
  • 5,905
  • 7
  • 52
  • 120
55
votes
5 answers

Sending an email from swift 3

I am trying to set up an app with send email option. I have this code: import Foundation import MessageUI import UIKit class emailClass: UIViewController, MFMailComposeViewControllerDelegate { override func viewDidLoad() { …
H.N.
  • 1,207
  • 2
  • 12
  • 28
18
votes
2 answers

Could an iOS application read/access SMS text?

I want to implement an iOS application which will use the SMS text as raw information. I think Apple does not allow this. Could an iOS application read/access SMS text? or do we have any other approach to do the same? Modification: Can we read…
Saurabh Shukla
  • 1,368
  • 3
  • 14
  • 26
16
votes
1 answer

iPhone - MFMailComposeViewController delegate incompatible type

I have a view controller which opens an MFMailComposeViewController modally. When I try to set the mail view controller's delegate to the parent view controller, I get this warning: Assigning to 'id' from…
serverpunk
  • 10,665
  • 15
  • 61
  • 95
8
votes
1 answer

Sending an email from your app with an image attached in Swift

I've tried a lot of tutorials on sending emails in your app but none of the ones I've seen show how to send an image with it. I'm recovering an image from .WriteToFile, This image is set to a UIImageView. How should I send an email with my…
Niall Kehoe
  • 379
  • 2
  • 5
  • 18
8
votes
2 answers

iOS - Core Data model Conflict With Mail Framework?

I have a Core Data object, Account, represented as a subclass of NSManagedObject: @interface Account : NSManagedObject My entire app has been developing just fine, however, when I add the MessageUI.framework so I can get a compose email view…
Josh
  • 12,448
  • 10
  • 74
  • 118
7
votes
2 answers

Weak link framework

Due to the last release of the adMob package, I have added the MessageUI framework to my project. As I wish to deploy my application to 2.x OS devices, I have weak linked MessageUI as advised. If I build for iPhone device 3.0, it works fine. If I…
Fred
  • 73
  • 1
  • 4
7
votes
1 answer

MFMailComposeViewController ignoring some of UIAppearance protocol in iOS 7

I have an iOS 7 only application that uses UIAppearance to style the UINavigationBar's throughout the app. I have the following code in my AppDelegate: [[UINavigationBar appearance] setBackgroundImage:redImage…
liamnichols
  • 12,419
  • 2
  • 43
  • 62
6
votes
3 answers

Sending email message from the app using MFMailComposeViewController in MessageUI on iPhone

I'm a software developer, and I'm making an application for the email message and I have the following code: // Header file // importing the MessageUI framework #import // adding the delegate functionality to the…
6
votes
1 answer

Set "To:" field as first responder in MFMailComposeViewController

Does anyone have any ideas on the right way to do this? There is one answer to a similar question on here, but it's so convoluted, I can't imagine it being right. There has to be an easier way to just show the keyboard when this modal view pops up.…
mitchkramez
  • 76
  • 1
  • 2
5
votes
1 answer

How to enable buttons in MessageUI (Swift 4)

I'm trying to enable the Camera and Apps buttons in MessageUI for my app. I haven't found any place in Apple's documentation on how to do this. Any ideas? Thanks! UPDATE: I found a disableUserAttachments() function in Apple's documentation, which is…
TDM
  • 814
  • 2
  • 12
  • 21
5
votes
1 answer

MFMailComposeViewController view does not dismiss 2nd time

I have what I believe is a unique problem. I am having trouble getting my email window to dismiss. I am using Xcode 8. The email dismisses correctly the first time I open it, but if I open it again it won't. If I press "Cancel" it does not give me…
Ryan Tensmeyer
  • 865
  • 10
  • 26
5
votes
2 answers

How to eliminate delay in presentation of MFMessageComposeViewController?

if([MFMessageComposeViewController canSendText]) { MFMessageComposeViewController *sms_message_vc = [[MFMessageComposeViewController alloc] init]; sms_message_vc.body = text; sms_message_vc.recipients = recipients; …
martin's
  • 3,853
  • 6
  • 32
  • 58
5
votes
1 answer

How to create a transparent overlay over the entire screen, including active keyboard

I have been able to put a semitransparent view above all the other views, including the keyboard, to tint the screen using this code: int count = [[[UIApplication sharedApplication]windows]count]; [[[UIApplication sharedApplication] windows]…
jadengeller
  • 1,307
  • 1
  • 14
  • 26
4
votes
1 answer

MFMessageComposeViewController sms sent delegate

I implemented in my app MFMessageComposeViewController for send sms. It works well, but I do not know if it is possible to know when the message is actually sent. -(void)sendSMS:(NSString *)bodyOfMessage recipientList:(NSArray *)recipients { …
Vins
  • 1,814
  • 4
  • 24
  • 40
1
2 3 4 5 6 7 8