How to send MMS from iPhone application

In my new iOS project, I want the end user to be able to MMS text and/or images (from TextField) in a UIButton action. I saw similar applications that have this functionality (with text, have not yet seen the image).

I have a google search, but I could not find how to do this, any help that was highly appreciated

+7
ios objective-c iphone mms
source share
1 answer

It will work great

 MFMessageComposeViewController *picker = [[MFMessageComposeViewController alloc] init]; UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; pasteboard.persistent = YES; pasteboard.image = [UIImage imageNamed:@"PDF_File.png"]; NSString *phoneToCall = @"sms:"; NSString *phoneToCallEncoded = [phoneToCall stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]; NSURL *url = [[NSURL alloc] initWithString:phoneToCallEncoded]; [[UIApplication sharedApplication] openURL:url]; if([MFMessageComposeViewController canSendText]) { NSMutableString *emailBody = [[NSMutableString alloc] initWithString:@"Your Email Body"]; picker.messageComposeDelegate = self; picker.recipients = [NSArray arrayWithObject:@"123456789"]; [picker setBody:emailBody];// your recipient number or self for testing picker.body = emailBody; NSLog(@"Picker -- %@",picker.body); [self presentModalViewController:picker animated:YES]; NSLog(@"SMS fired"); } 
+18
source share

All Articles