Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 998069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:08:08+00:00 2026-05-16T07:08:08+00:00

In my application, MFMailComposeViewController works fine but creating a new instance of MFMessageComposeViewController fails.

  • 0

In my application, MFMailComposeViewController works fine but creating a new instance of MFMessageComposeViewController fails.

Here is the code for both:

-( IBAction)sendSMS: (id)sender
{
 MFMessageComposeViewController *picker = [[[MFMessageComposeViewController alloc] init] autorelease];
 picker.messageComposeDelegate = self;

 NSArray *toRecipients = [NSArray arrayWithObject: cell.currentTitle ]; 

 picker.recipients = toRecipients;

 [self presentModalViewController:picker animated:YES];
}

-( IBAction)sendEmail: (id)sender
{
 MFMailComposeViewController *picker = [[[MFMailComposeViewController alloc] init] autorelease];
 picker.mailComposeDelegate = self;

 NSArray *toRecipients = [NSArray arrayWithObject: email.currentTitle ]; 

 [picker setToRecipients:toRecipients];

 [self presentModalViewController:picker animated:YES];
}

Its seemingly obvious that everything is linking correctly because the email view controller works fine. Is there something I am missing maybe configuration wise?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T07:08:09+00:00Added an answer on May 16, 2026 at 7:08 am

    Have you checked +[MFMessageComposeViewController canSendText]?

    From the MFMessageComposeViewController Class Reference,

    Before presenting a message composition view, call the canSendText class method to ensure that the user’s device is appropriately configured. Do not attempt to present a message composition view if the canSendText method returns NO. If SMS delivery isn’t available, you can notify the user or simply disable the SMS features in your application.

    Starting in iOS 5, you can register to be notified of changes to the availability of text message sending by way of the MFMessageComposeViewControllerTextMessageAvailabilityDidChangeNotification notification.

    Reasons it might be returning nil:

    • Device isn’t running iOS 4.
    • Device is an iPod Touch/iPad without iMessage enabled.
    • No SIM card? (The view now shows in iOS 6; the app is not notified of the message send failure.)
    • “Device” is actually the simulator. (Perhaps this works in iOS 6 too.)

    Similarly, [[MFMailComposeViewController alloc] init] returns nil when no mail accounts are enabled (you can quickly test this by disabling accounts in Settings), but also shows a “No mail accounts configured” alert for you. MFMessageComposeViewController does not do this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a MFMailComposeViewController for my application, and everything works fine, but every
Application is sending email by using MFMailComposeViewController , everything works just fine. However after
I have written a code for mail application like: { MFMailComposeViewController *picker=[MFMailComposeViewController alloc] init];
i need to send mail in my application. for that my code is, MFMailComposeViewController
The code below works perfectly to send text (.txt) attachments via the mail application
IN my application i use MFMailComposeViewController class to send mail and i know in
In my application I use MFMailComposeViewController to send an email. I add a picture
I'm using the MFMailComposeViewController to send an email from within an iPhone v3.0 application.
I have send an attachment through iPhone application. But when I see the mail,
Application level events and processes in Excel are restricted to a single instance of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.