Peter Warbo
Peter Warbo

Reputation: 11728

iOS - wait_fences MFMessageComposeViewController

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?

Upvotes: 7

Views: 499

Answers (2)

toblerpwn
toblerpwn

Reputation: 5545

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.)

Upvotes: 1

Smixx
Smixx

Reputation: 345

As far as I know this has nothing to do with your application and is an OS level message.

Upvotes: 0

Related Questions