When and at what case MessageComposeResultFailed gets fired inside MFMessageComposerViewController?

The didFinishWithResult delegate method of MFMessageComposeViewController shows that the message has been sent successfully, even when the device is in airplane mode or when the device has no SIM,but the message sending is failed.The delegate does not go through the failure state.Why doesnt it go to failure state?.Please give me some suggestion on this. The code is given as below:
Code Block - (void)displaySMSComposerSheet
{
MFMessageComposeViewController *picker = [[MFMessageComposeViewController alloc] init];
picker.messageComposeDelegate = self;
// You can specify one or more preconfigured recipients. The user has
// the option to remove or add recipients from the message composer view
// controller.
/* picker.recipients = @[@"Phone number here"]; */
// You can specify the initial message text that will appear in the message
// composer view controller.
picker.body = @"Hello from California!";
[self presentViewController:picker animated:YES completion:NULL];
}
// -------------------------------------------------------------------------------
// messageComposeViewController:didFinishWithResult:
// Dismisses the message composition interface when users tap Cancel or Send.
// Proceeds to update the feedback message field with the result of the
// operation.
// -------------------------------------------------------------------------------
- (void)messageComposeViewController:(MFMessageComposeViewController *)controller
didFinishWithResult:(MessageComposeResult)result
{
self.feedbackMsg.hidden = NO;
// Notifies users about errors associated with the interface
switch (result)
{
case MessageComposeResultCancelled:
self.feedbackMsg.text = @"Result: SMS sending canceled";
break;
case MessageComposeResultSent:
self.feedbackMsg.text = @"Result: SMS sent";
break;
case MessageComposeResultFailed:
self.feedbackMsg.text = @"Result: SMS sending failed";
break;
default:
self.feedbackMsg.text = @"Result: SMS not sent";
break;
}
[self dismissViewControllerAnimated:YES completion:NULL];
}
For me and other multiple devices when we press "CANCEL" or "SEND" message the correct delegates are fired. But when I switch ON the AIRPLANE Mode or the device with no SIM still the MessageComposeResultSent Is fired. Can some one tell clearly when the MessageComposeResultFailed is fired? Any live steps? Please kindly help me

This is my last hope. I just want know when the Status Failed gets fired with step by step procedure

Replies

MessageComposeResultFailed will be fired when the user’s attempt to save or send the message was unsuccessful. You can refer documentation for more details. https://developer.apple.com/library/prerelease/ios/documentation/MessageUI/Reference/MFMessageComposeViewController_class/index.html#//apple_ref/c/tdef/MessageComposeResult

It means maybe some internal system/OS issue and in some cases message sending is blocked by the network provider. In general this delegate is very rare to get caught firing.

Also The delegate method can report MessageComposeResultSent even if all your app did was give the message to the system to send. It's not a guarantee that it actually sent the message.