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:
This is my last hope. I just want know when the Status Failed gets fired with step by step procedure
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