MFMessageComposeViewController を使用して大量の受信者リスト (40 を超えるなど) を送信しようとすると問題が発生します。iOS7 では、SMS 作成ビューを表示する前に 20 秒以上空白の画面が表示されます。これは、iOS5 および iOS6 では発生しません。
以下は、私が使用している既存のコードです。
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];
}
以下は、多くの人に送信しようとしたときに受け取った出力メッセージです。
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.