Questions tagged [mfmessagecomposeviewcontroller]

For questions about the MFMessageComposeViewController class in iOS, which allows composing and sending text messages.

The MFMessageComposeViewController class provides a standard system user interface for composing text messages. Use this class to configure the initial recipients and body of the message, if desired, and to configure a delegate object to respond to the final result of the user’s action—whether they chose to cancel or send the message. After configuring initial values, present the view controller modally using the presentModalViewController:animated: method. When done, dismiss it using the dismissModalViewControllerAnimated: method.

Reference: https://developer.apple.com/library/prerelease/ios/documentation/MessageUI/Reference/MFMessageComposeViewController_class/index.html

199 questions
5
votes
1 answer

MFMessageComposeViewController opens MMS editing instead of SMS and 'buddy name' text instead of telephone number

I develop an IOS app with a feature, which sends SMS with a source code generated text to source code generated telephone recipients. It works great for several months for ~hundred user, but now I got an interesting bug: when SMS UI appears, instead…
Tom
  • 3,899
  • 22
  • 78
  • 137
4
votes
2 answers

messageComposeViewController dismissing crash swift 3

On my App, I send alert via sms. I try to open a new view controller as a modal, and in this , the alert was sent. But, when the sms is sent or when user click on the cancel button, the messageComposeViewController do not dismiss, and crash. Error…
ewan
  • 276
  • 2
  • 17
4
votes
2 answers

How to change color of navigation bar in mfmessagecomposeviewcontroller while presenting it in ios 9

MFMessageComposeViewController *messageController = [[MFMessageComposeViewController alloc]init]; [UINavigationBar appearance].barTintColor = [UIColor colorWithRed:0.0f/255.0f green:127.0f/255.0f blue:254.0f/255.0f alpha:1.0]; …
4
votes
1 answer

MFMessageComposeViewController will not present in form sheet on iPad

If I run this code on an iPad (iOS 8) from a view controller: MFMessageComposeViewController *controller = [[[MFMessageComposeViewController alloc]init]autorelease]; controller.modalPresentationStyle = UIModalPresentationFormSheet; [self…
Tom Hamming
  • 10,577
  • 11
  • 71
  • 145
4
votes
1 answer

How do I change the color of the MFMessageComposeViewController elements?

I set up and open my MFMessageComposeViewController with the following: - (void)openSMSViewWithRecipientsArray:(NSArray *)recipients { MFMessageComposeViewController *messageVC = [MFMessageComposeViewController new]; …
Adam Johns
  • 35,397
  • 25
  • 123
  • 176
4
votes
1 answer

MFMessageComposeViewController stops sms messaging

I'm using MFMessageComposeViewController in my iOS app. MFMessageComposeViewController *controller = [[[MFMessageComposeViewController alloc] init]; if([MFMessageComposeViewController canSendText]){ controller.body = text; …
4
votes
1 answer

How to dismiss message window for in-app ios text messaging

Once the sms window pops up, I cannot get it to close again. The cancel button does not work, and the send button will send the sms but not close the window. I've looked through many of the similar questions on here and they all suggest either…
4
votes
2 answers

MFMessageComposeViewController: How to restrict to send message as Cellular Message not as iMessage

I use MFMesageComposeViewController to send message it is creating problems for me. when i send message to multiple recipients it works fine whether iMessages are Enable or disable from settings. But when i send message to single contact and and…
4
votes
1 answer

MFMessageComposeViewController not working

I have a simple method that gets one argument and then sends a message. It is not working. Code: - (void)sendSMS:(NSString *)text { MFMessageComposeViewController *viewController = [[MFMessageComposeViewController alloc] init]; …
4
votes
1 answer

Application tried to push a nil view controller on target

Has anybody encountered this kind of error in MFMessageComposeViewController? I allocated and presented it like this: MFMessageComposeViewController *message = [[MFMessageComposeViewController alloc] init]; message.messageComposeDelegate =…
4
votes
2 answers

MFMessageComposeViewController feedback of editing of To: field

I have an application which is using standard SMS functionality provided by MFMessageComposeViewController. I have an array of recipients visible in TO: field of the SMS dialog. The user has a possibility to remove or add new recipients. This is ok…
Petko Yanakiev
  • 159
  • 2
  • 8
4
votes
1 answer

MFMessageComposeViewController not calling its delegate method

Hi i'm using MFMessageComposeViewController to send sms in my iOS project my code is like below, MFMessageComposeViewController *message = [[MFMessageComposeViewController alloc] init]; message.delegate = self; message.recipients = [NSArray…
Graham Bell
  • 1,139
  • 1
  • 14
  • 30
3
votes
1 answer

MFMessageComposeViewController + SwiftUI Buggy Behavior

I'm using ViewControllerRepresentable to present a MFMessageComposeViewController so users can send texts from my app. However, every time the view is presented, it's very buggy - elements randomly disappear, scrolling is off, and the screen…
3
votes
1 answer

MFMessageComposeViewController presented without recipient field (iOS 11)

When I present MFMessageComposeViewController on an iOS 11 device it's presented mysteriously missing the recipient field. The same code works on an iPhone 6 running iOS 10.
3
votes
1 answer

How to disable attachments button in MFMessageComposeViewController?

How to disable this button, I just want people sent normal sms , not attachments.
1
2
3
13 14