0

I'm trying to use MFMessage to send a text message from my app and I can send the message to around 15 people, but more than that, it successfully que's but the Messages app on the device says the text is not deliverable. There's not much information given to why it fails, it just does. Is there something different I should be doing, or a reason this would be happening?

Here's how I'm sending the message currently:

dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 0.01 * NSEC_PER_SEC);
        dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
            if(thread.smsMembers.count>0)
            {
                if(![MFMessageComposeViewController canSendText]) {
                    UIAlertView *warningAlert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Your device doesn't support SMS!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
                    [warningAlert show];
                    return;
                }
                    NSString *message = text;

                    self.messageController = [[MFMessageComposeViewController alloc] init];
                    [_messageController setMessageComposeDelegate:self];
                    [_messageController setRecipients:thread.smsMembers];
                    if(!type){
                        [_messageController setBody:message];
                    } else{
                        if([type isEqual: @"image"]){
                            NSData *imageData = [file getData];
                            [_messageController addAttachmentData:imageData typeIdentifier:(NSString *)kUTTypePNG filename:@"image.png"];
                        } else if([type isEqual: @"video"]){
                            NSData *videoData = [NSData dataWithContentsOfURL:[NSURL URLWithString:file.url]];
                            [_messageController addAttachmentData:videoData typeIdentifier:(NSString *)kUTTypeMovie filename:@"video.mov"];
                        }

                    }
                    [self presentViewController:_messageController animated:YES completion:nil];
            }
        });
Jake Lisby
  • 494
  • 5
  • 21
  • 1
    there maybe a limit imposed by your witless provider on SMS text. If you need to add large number of people you are better off sending them an email – Sam B Apr 20 '15 at 15:32
  • 1
    You're right. I never for once thought the provider would limit, but AT&T limits to 10 numbers on a group message. So dumb... Thanks for helping point me to the answer. – Jake Lisby Apr 20 '15 at 16:07

0 Answers0