2

I am using ShareKit. Sending SMS messages uses the MFMessageComposeViewController, with the user seeing the title "Text". I want to change that title to something that is more reflective of what is actually available, which may be SMS or iMessage or both. (For example, I don't want the prompt to say "SMS" if the device doesn't support SMS, but I want it to say SMS if the device does support SMS. If it supports both, the title will reflect that, too.)

Is there a way to determine if iMessage is available and configured? Is there a way to determine if SMS is available and configured?

The devices I want to support are iPhone, iPod Touch, and iPad. The iOS versions should be from 4.3 forward.

Jim
  • 5,940
  • 9
  • 44
  • 91
  • Jim, Did you faced any misbehavior of "MFMessageComposeViewController" in ios 6.0 & 5.0 while dismissing the keyboard? – Preetha Jan 25 '13 at 12:27

1 Answers1

1

Can check like

Class messageClass = (NSClassFromString(@"MFMessageComposeViewController"));

if (messageClass != nil) {
    // Check whether the current device is configured for sending SMS messages
    if ([messageClass canSendText]) {
        //code for sending SMS
    } else {
        //Not configured
    }
}
Michael Celey
  • 12,645
  • 6
  • 57
  • 62
Preetha
  • 151
  • 1
  • 2