MFMessageComposeViewController shows blank white screen in iOS7

There is a problem when I try to send a list of large recipients (for example, over 40) using MFMessageComposeViewController. In iOS7, it will display a blank white screen for 20 seconds or more before displaying the SMS view. This does not happen for iOS5 and iOS6.

Below is the code I'm using,

NSArray * recipients; for (NSIndexPath * index in selectedRows) { NSDictionary *dictionary = [data objectAtIndex:index.row]; NSString *phoneNum = [dictionary objectForKey:@"contactNum"]; recipients = [NSArray arrayWithObjects:phoneNum, nil]]; } MFMessageComposeViewController *controller = [[MFMessageComposeViewController alloc] init]; if([MFMessageComposeViewController canSendText]) { controller.body = bodyOfMessage; controller.recipients = recipients; controller.messageComposeDelegate = self ; controller.wantsFullScreenLayout = NO; [(id)_delegate presentModalViewController:controller animated:YES]; [[UIApplication sharedApplication] setStatusBarHidden:YES]; } 

Below is the message I received when I try to send many.

 timed out waiting for fence barrier from com.apple.mobilesms.compose Received memory warning. Received memory warning. Received memory warning. Received memory warning. Received memory warning. Received memory warning. Received memory warning. Received memory warning. Received memory warning. 
+4
source share
5 answers

I had a similar problem when I received a message in the console "

fence waiting time fencing from com.apple.mobilesms.compose

The problem was that I tried to add the number as a string in my application, but because of the localization request I posted it in the form: NSArray *recipents = @[NSLocalizedString(@"numberForRegistrationViaSms", @"")];

and

 [messageController setRecipients:@[recipents]]; 

This doesn’t work for some reason, but when I just put, [messageController setRecipients:@[@"123456789"]]; The SMS composer appears without any problems.

+4
source

I had the same problem as figured

controller.recipients = // should always be an array of strings.

Verify that the phone numbers sent to the controller are NSString.

+2
source

I think I may resolve this:

// must initiate a new NSString object

  NSString * phoneStr = [NSString stringWithFormat: @ "% @", ...];                                                     

 MFMessageComposeViewController * aCtrl = [[MFMessageComposeViewController alloc] init];
 aCtrl.recipients = @ [phoneStr];
 ...

 Then OK.

+1
source

I had the same problem.

  • fence waiting time from com.apple.mobilesms.compose

  • Cancel message

Instead of this:

  NSString *phoneNumber = @"888888888"; [picker setRecipients:@[phoneNumber]]; 

Try the following:

  NSString *phoneNumber = person.phoneNumber; [picker setRecipients:@[[NSString stringWithFormat:@"%@", phoneNumber]]]; 

It worked for me.

+1
source

The problem was resolved in iOS 7.0.3.

-2
source

All Articles