I'm trying to show a MFMessageComposeViewController view by doing:
MFMessageComposeViewController *mfMessageComposeVC = [[MFMessageComposeViewController alloc] init];
if([MFMessageComposeViewController canSendText]) {
mfMessageComposeVC.body = @"Test.";
mfMessageComposeVC.recipients = [NSArray arrayWithObjects:@"123456", @"34567", nil];
mfMessageComposeVC.messageComposeDelegate = self;
[self presentModalViewController:mfMessageComposeVC animated:YES];
}
When I check the log output I see this warning message:
wait_fences: failed to receive reply: 10004003
What would be the reason of this behaviour and what exactly does this warning message mean?
If you're still dealing with this problem (or if others hit it later):
wait_fences
typically means that you are manipulating UI off-screen (or during a competing animation) - possibly either within the MFMailComposeViewer
, or more likely behind it. (There are a ton of other wait_fences
questions here on Stack.)
In other words, the problem is likely not with the code you posted, but with the other UI events happening around it.
If that (and searching) doesn't lead you to a fix, you can manually troubleshoot the problem by commenting-out the surrounding UI-related code until it works, or (failing that) reduce the failing code to its simplest possible example version and post it here so we can troubleshoot it further.
(Also, presentModalViewController:animated:
is deprecated in iOS6, but this question was asked in the halcyon days of iOS5, so I'm sure that's not the problem.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With