<p>Does anybody know if it's possible, and how, to programmatically send a <strong>SMS</strong> from the <code>iPhone</code>, with the official SDK / Cocoa Touch?</p>

[{'answer_id': 59159, 'author': 'millenomi', 'author_id': 6061, 'author_profile': 'https://Stackoverflow.com/users/6061', 'pm_score': 6, 'selected': False, 'text': '<p>You can use a <code>sms:[target phone number]</code> URL to open the SMS application, but there are no indications on how to prefill a SMS body with text.</p>\n'}, {'answer_id': 59200, 'author': 'Adam Davis', 'author_id': 2915, 'author_profile': 'https://Stackoverflow.com/users/2915', 'pm_score': 9, 'selected': False, 'text': '<h3>Restrictions</h3>\n\n<p>If you could send an SMS within a program on the iPhone, you\'ll be able to write games that spam people in the background.  I\'m sure you really want to have spams from your friends, "Try out this new game!  It roxxers my boxxers, and yours will be too! roxxersboxxers.com!!!! If you sign up now you\'ll get 3,200 RB points!!"</p>\n\n<p>Apple has restrictions for automated (or even partially automated) SMS and dialing operations.  (Imagine if the game instead dialed 911 at a particular time of day)</p>\n\n<p>Your best bet is to set up an intermediate server on the internet that uses an online SMS sending service and send the SMS via that route if you need complete automation.  (ie, your program on the iPhone sends a UDP packet to your server, which sends the real SMS)</p>\n\n<h3>iOS 4 Update</h3>\n\n<p>iOS 4, however, now provides a <code>viewController</code> you can import into your application.  You prepopulate the SMS fields, then the user can initiate the SMS send within the controller.  Unlike using the "SMS:..." url format, this allows your application to stay open, and allows you to populate both the <em>to</em> and the <em>body</em> fields.  You can even specify multiple recipients.</p>\n\n<p>This prevents applications from sending automated SMS without the user explicitly aware of it.  You still cannot send fully automated SMS from the iPhone itself, it requires some user interaction.  But this at least allows you to populate everything, and avoids closing the application.</p>\n\n<p>The <a href="https://developer.apple.com/documentation/messageui/mfmessagecomposeviewcontroller" rel="noreferrer">MFMessageComposeViewController</a> class is well documented, and <a href="http://blog.mugunthkumar.com/coding/iphone-tutorial-how-to-send-in-app-sms/" rel="noreferrer">tutorials</a> show how easy it is to implement.</p>\n\n<h3>iOS 5 Update</h3>\n\n<p>iOS 5 includes messaging for iPod touch and iPad devices, so while I\'ve not yet tested this myself, it may be that all iOS devices will be able to send SMS via MFMessageComposeViewController.  If this is the case, then Apple is running an SMS server that sends messages on behalf of devices that don\'t have a cellular modem.</p>\n\n<h3>iOS 6 Update</h3>\n\n<p>No changes to this class.</p>\n\n<h3>iOS 7 Update</h3>\n\n<p>You can now check to see if the message medium you are using will accept a subject or attachments, and what kind of attachments it will accept.  You can edit the subject and add attachments to the message, where the medium allows it.</p>\n\n<h3>iOS 8 Update</h3>\n\n<p>No changes to this class.</p>\n\n<h3>iOS 9 Update</h3>\n\n<p>No changes to this class.</p>\n\n<h3>iOS 10 Update</h3>\n\n<p>No changes to this class.</p>\n\n<h3>iOS 11 Update</h3>\n\n<p><a href="https://developer.apple.com/documentation/messageui/mfmessagecomposeviewcontroller?changes=latest_major" rel="noreferrer">No significant changes to this class</a></p>\n\n<h3>Limitations to this class</h3>\n\n<p>Keep in mind that this won\'t work on phones without iOS 4, and it won\'t work on the iPod touch or the iPad, except, perhaps, under iOS 5.  You must either detect the device and iOS limitations prior to using this controller, or risk restricting your app to recently upgraded 3G, 3GS, and 4 iPhones.</p>\n\n<p>However, an intermediate server that sends SMS will allow any and all of these iOS devices to send SMS as long as they have internet access, so it may still be a better solution for many applications.  Alternately, use both, and only fall back to an online SMS service when the device doesn\'t support it.</p>\n'}, {'answer_id': 2159464, 'author': 'new soul', 'author_id': 239368, 'author_profile': 'https://Stackoverflow.com/users/239368', 'pm_score': 2, 'selected': False, 'text': '<p>If you want, you can use the private framework <code>CoreTelephony</code> which called <code>CTMessageCenter</code> class. There are a few methods to send sms.</p>\n'}, {'answer_id': 3326464, 'author': 'Daniel Amitay', 'author_id': 314042, 'author_profile': 'https://Stackoverflow.com/users/314042', 'pm_score': 7, 'selected': False, 'text': '<p>Here is a tutorial which does exactly what you are looking for: the <code>MFMessageComposeViewController</code>.</p>\n\n<p><a href="http://blog.mugunthkumar.com/coding/iphone-tutorial-how-to-send-in-app-sms/" rel="noreferrer">http://blog.mugunthkumar.com/coding/iphone-tutorial-how-to-send-in-app-sms/</a></p>\n\n<p>Essentially:</p>\n\n<pre><code>MFMessageComposeViewController *controller = [[[MFMessageComposeViewController alloc] init] autorelease];\nif([MFMessageComposeViewController canSendText])\n{\n    controller.body = @"SMS message here";\n    controller.recipients = [NSArray arrayWithObjects:@"1(234)567-8910", nil];\n    controller.messageComposeDelegate = self;\n    [self presentModalViewController:controller animated:YES];\n}\n</code></pre>\n\n<p>And a link to the docs.</p>\n\n<p><a href="https://developer.apple.com/documentation/messageui/mfmessagecomposeviewcontroller" rel="noreferrer">https://developer.apple.com/documentation/messageui/mfmessagecomposeviewcontroller</a></p>\n'}, {'answer_id': 3683183, 'author': 'Pankaj Kainthla', 'author_id': 401198, 'author_profile': 'https://Stackoverflow.com/users/401198', 'pm_score': 2, 'selected': False, 'text': '<p>There is a class in iOS 4 which supports sending messages with body and recipents from your application. It works the same as sending mail. You can find the documentation here: <a href="http://developer.apple.com/iphone/library/documentation/MessageUI/Reference/MFMessageComposeViewController_class/Reference/Reference.html" rel="nofollow noreferrer">link text</a></p>\n'}, {'answer_id': 8419150, 'author': 'Najeebullah Shah', 'author_id': 1032321, 'author_profile': 'https://Stackoverflow.com/users/1032321', 'pm_score': 7, 'selected': False, 'text': '<ol>\n<li>You must add the MessageUI.framework to your Xcode project</li>\n<li>Include an <code>#import &lt;MessageUI/MessageUI.h&gt;</code> in your header file</li>\n<li>Add these delegates to your header file <code>MFMessageComposeViewControllerDelegate</code>  &amp; <code>UINavigationControllerDelegate</code></li>\n<li>In your <code>IBAction</code> method declare instance of <code>MFMessageComposeViewController</code> say <code>messageInstance</code></li>\n<li>To check whether your device can send text use <code>[MFMessageComposeViewController canSendText]</code> in an if condition, it\'ll return Yes/No </li>\n<li><p>In the <code>if</code> condition do these:</p>\n\n<ol>\n<li><p>First set body for your <code>messageInstance</code> as:</p>\n\n<pre><code>messageInstance.body = @"Hello from Shah";\n</code></pre></li>\n<li><p>Then decide the recipients for the message as:</p>\n\n<pre><code>messageInstance.recipients = [NSArray arrayWithObjects:@"12345678", @"87654321",         nil];\n</code></pre></li>\n<li><p>Set a delegate to your messageInstance as:</p>\n\n<pre><code>messageInstance.messageComposeDelegate = self;\n</code></pre></li>\n<li><p>In the last line do this: </p>\n\n<pre><code>[self presentModalViewController:messageInstance animated:YES];\n</code></pre></li>\n</ol></li>\n</ol>\n'}, {'answer_id': 10647336, 'author': 'Rock', 'author_id': 1136908, 'author_profile': 'https://Stackoverflow.com/users/1136908', 'pm_score': 1, 'selected': False, 'text': '<p>Use this:</p>\n\n<pre><code>- (void)showSMSPicker\n{\n    Class messageClass = (NSClassFromString(@"MFMessageComposeViewController"));\n\n    if (messageClass != nil) {          \n        // Check whether the current device is configured for sending SMS messages\n        if ([messageClass canSendText]) {\n           [self displaySMSComposerSheet];\n        }   \n    }\n}\n\n- (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result\n{       \n    //feedbackMsg.hidden = NO;\n    // Notifies users about errors associated with the interface\n    switch (result)\n    {\n        case MessageComposeResultCancelled:\n        {   \n            UIAlertView *alert1 = [[UIAlertView alloc] initWithTitle:@"Message" message:@"SMS sending canceled!!!" delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK", nil];\n            [alert1 show];\n            [alert1 release];\n        }   \n\n        // feedbackMsg.text = @"Result: SMS sending canceled";\n        break;\n\n        case MessageComposeResultSent:\n        {\n            UIAlertView *alert2 = [[UIAlertView alloc] initWithTitle:@"Message" message:@"SMS sent!!!" delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK", nil];\n            [alert2 show];\n            [alert2 release];\n        }   \n\n        // feedbackMsg.text = @"Result: SMS sent";\n        break;\n\n        case MessageComposeResultFailed:\n        {   \n            UIAlertView *alert3 = [[UIAlertView alloc] initWithTitle:@"Message" message:@"SMS sending failed!!!" delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK", nil];\n            [alert3 show];\n            [alert3 release];\n        }   \n\n        // feedbackMsg.text = @"Result: SMS sending failed";\n        break;\n\n        default:\n        {   \n            UIAlertView *alert4 = [[UIAlertView alloc] initWithTitle:@"Message" message:@"SMS not sent!!!" delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK", nil];\n            [alert4 show];\n            [alert4 release];\n        }   \n\n        // feedbackMsg.text = @"Result: SMS not sent";\n        break;\n    }\n\n    [self dismissModalViewControllerAnimated: YES];\n}\n</code></pre>\n'}, {'answer_id': 12142065, 'author': 'Rushabh', 'author_id': 951996, 'author_profile': 'https://Stackoverflow.com/users/951996', 'pm_score': 4, 'selected': False, 'text': '<pre><code>//Add the Framework in .h file\n\n#import &lt;MessageUI/MessageUI.h&gt;\n#import &lt;MessageUI/MFMailComposeViewController.h&gt;\n\n//Set the delegate methods\n\nUIViewController&lt;UINavigationControllerDelegate,MFMessageComposeViewControllerDelegate&gt;\n\n//add the below code in .m file\n\n\n- (void)viewDidAppear:(BOOL)animated{\n    [super viewDidAppear:animated];\n\n    MFMessageComposeViewController *controller = \n    [[[MFMessageComposeViewController alloc] init] autorelease];\n\n    if([MFMessageComposeViewController canSendText])\n    { \n        NSString *str= @"Hello";\n        controller.body = str;\n        controller.recipients = [NSArray arrayWithObjects:\n                                 @"", nil];\n        controller.delegate = self;\n        [self presentModalViewController:controller animated:YES];  \n    }\n\n\n}\n\n- (void)messageComposeViewController:\n(MFMessageComposeViewController *)controller\n                 didFinishWithResult:(MessageComposeResult)result \n{\n    switch (result)\n    {\n        case MessageComposeResultCancelled:  \n            NSLog(@"Cancelled");    \n            break; \n        case MessageComposeResultFailed:\n            NSLog(@"Failed");\n            break;   \n        case MessageComposeResultSent:      \n            break; \n        default:  \n            break;  \n    }  \n    [self dismissModalViewControllerAnimated:YES]; \n}\n</code></pre>\n'}, {'answer_id': 13063499, 'author': 'isox', 'author_id': 1722481, 'author_profile': 'https://Stackoverflow.com/users/1722481', 'pm_score': 5, 'selected': False, 'text': '<p>One of the systems of inter-process communication in MacOS is XPC. This system layer has been developed for inter-process communication based on the transfer of plist structures using libSystem and launchd. In fact, it is an interface that allows managing processes via the exchange of such structures as dictionaries. Due to heredity, iOS 5 possesses this mechanism as well.</p>\n\n<p>You might already understand what I mean by this introduction. Yep, there are system services in iOS that include tools for XPC communication. And I want to exemplify the work with a daemon for SMS sending. However, it should be mentioned that this ability is fixed in iOS 6, but is relevant for iOS 5.0—5.1.1. Jailbreak, Private Framework, and other illegal tools are not required for its exploitation. Only the set of header files from the directory /usr/include/xpc/* are needed.</p>\n\n<p>One of the elements for SMS sending in iOS is the system service com.apple.chatkit, the tasks of which include generation, management, and sending of short text messages. For the ease of control, it has the publicly available communication port com.apple.chatkit.clientcomposeserver.xpc. Using the XPC subsystem, you can generate and send messages without user\'s approval.\u2003</p>\n\n<p>Well, let\'s try to create a connection.</p>\n\n<pre><code>xpc_connection_t myConnection;\n\ndispatch_queue_t queue = dispatch_queue_create("com.apple.chatkit.clientcomposeserver.xpc", DISPATCH_QUEUE_CONCURRENT);\n\nmyConnection = xpc_connection_create_mach_service("com.apple.chatkit.clientcomposeserver.xpc", queue, XPC_CONNECTION_MACH_SERVICE_PRIVILEGED);\n</code></pre>\n\n<p>Now we have the XPC connection myConnection set to the service of SMS sending. However, XPC configuration provides for creation of suspended connections —we need to take one more step for the activation.</p>\n\n<pre><code>xpc_connection_set_event_handler(myConnection, ^(xpc_object_t event){\nxpc_type_t xtype = xpc_get_type(event);\nif(XPC_TYPE_ERROR == xtype)\n{\nNSLog(@"XPC sandbox connection error: %s\\n", xpc_dictionary_get_string(event, XPC_ERROR_KEY_DESCRIPTION));\n}\n// Always set an event handler. More on this later.\n\nNSLog(@"Received a message event!");\n\n});\n\nxpc_connection_resume(myConnection);\n</code></pre>\n\n<p>The connection is activated. Right at this moment iOS 6 will display a message in the telephone log that this type of communication is forbidden. Now we need to generate a dictionary similar to xpc_dictionary with the data required for the message sending.</p>\n\n<pre><code>NSArray *recipient = [NSArray arrayWithObjects:@"+7 (90*) 000-00-00", nil];\n\nNSData *ser_rec = [NSPropertyListSerialization dataWithPropertyList:recipient format:200 options:0 error:NULL];\n\nxpc_object_t mydict = xpc_dictionary_create(0, 0, 0);\nxpc_dictionary_set_int64(mydict, "message-type", 0);\nxpc_dictionary_set_data(mydict, "recipients", [ser_rec bytes], [ser_rec length]);\nxpc_dictionary_set_string(mydict, "text", "hello from your application!");\n</code></pre>\n\n<p>Little is left: send the message to the XPC port and make sure it is delivered.</p>\n\n<pre><code>xpc_connection_send_message(myConnection, mydict);\nxpc_connection_send_barrier(myConnection, ^{\nNSLog(@"The message has been successfully delivered");\n});\n</code></pre>\n\n<p>That\'s all. SMS sent.</p>\n'}, {'answer_id': 16491171, 'author': 'Bharat Gulati', 'author_id': 781067, 'author_profile': 'https://Stackoverflow.com/users/781067', 'pm_score': 5, 'selected': False, 'text': '<p>Add the MessageUI.Framework and use the following code </p>\n\n<pre><code>#import &lt;MessageUI/MessageUI.h&gt; \n</code></pre>\n\n<p>And then:</p>\n\n<pre><code>if ([MFMessageComposeViewController canSendText]) {\n  MFMessageComposeViewController *messageComposer =\n  [[MFMessageComposeViewController alloc] init];\n  NSString *message = @"Your Message here";\n  [messageComposer setBody:message];\n  messageComposer.messageComposeDelegate = self;\n  [self presentViewController:messageComposer animated:YES completion:nil];\n}\n</code></pre>\n\n<p>and the delegate method - </p>\n\n<pre><code>- (void)messageComposeViewController:(MFMessageComposeViewController *)controller\n             didFinishWithResult:(MessageComposeResult)result {\n      [self dismissViewControllerAnimated:YES completion:nil];\n }\n</code></pre>\n'}, {'answer_id': 18697017, 'author': 'mandeep', 'author_id': 2454925, 'author_profile': 'https://Stackoverflow.com/users/2454925', 'pm_score': 2, 'selected': False, 'text': '<pre><code>- (void)sendSMS:(NSString *)bodyOfMessage recipientList:(NSArray *)recipients\n{\n    UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];\n    UIImage *ui =resultimg.image;\n    pasteboard.image = ui;\n    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"sms:"]];\n}\n</code></pre>\n'}, {'answer_id': 22034318, 'author': 'Dinesh Reddy Chennuru', 'author_id': 2882811, 'author_profile': 'https://Stackoverflow.com/users/2882811', 'pm_score': 4, 'selected': False, 'text': '<p>You can use this approach:</p>\n\n<pre><code>[[UIApplication sharedApplication]openURL:[NSURL URLWithString:@"sms:MobileNumber"]]\n</code></pre>\n\n<p><br>iOS will automatically navigate from your app to the messages app\'s message composing page. Since the URL\'s scheme starts with sms:, this is identified as a type that is recognized by the messages app and launches it.</p>\n'}, {'answer_id': 25013218, 'author': 'Tunvir Rahman Tusher', 'author_id': 1918966, 'author_profile': 'https://Stackoverflow.com/users/1918966', 'pm_score': 4, 'selected': False, 'text': '<p><strong>Follow this procedures</strong></p>\n\n<p>1 .Add <code>MessageUI.Framework</code> to project<img src="https://i.stack.imgur.com/sjobz.png" alt="enter image description here"></p>\n\n<p>2 . Import <code>#import &lt;MessageUI/MessageUI.h&gt;</code> in .h file.</p>\n\n<p>3 . Copy this code for sending message</p>\n\n<pre><code> if ([MFMessageComposeViewController canSendText]) {\n    MFMessageComposeViewController *messageComposer =\n    [[MFMessageComposeViewController alloc] init];\n    NSString *message = @"Message!!!";\n    [messageComposer setBody:message];\n    messageComposer.messageComposeDelegate = self;\n    [self presentViewController:messageComposer animated:YES completion:nil];\n}\n</code></pre>\n\n<p>4 . Implement <code>delegate</code> method if you want to.</p>\n\n<pre><code>- (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result{\n\n\n   ///your stuff here \n\n    [self dismissViewControllerAnimated:YES completion:nil];\n}\n</code></pre>\n\n<p>Run And GO!</p>\n'}, {'answer_id': 25118840, 'author': 'Rinku Sadhwani', 'author_id': 1037317, 'author_profile': 'https://Stackoverflow.com/users/1037317', 'pm_score': 1, 'selected': False, 'text': '<pre><code>[[UIApplication sharedApplication]openURL:[NSURL URLWithString:@"sms:number"]] \n</code></pre>\n\n<p>This would be the best and short way to do it.</p>\n'}, {'answer_id': 28964163, 'author': 'ALOK KUMAR', 'author_id': 4628096, 'author_profile': 'https://Stackoverflow.com/users/4628096', 'pm_score': 2, 'selected': False, 'text': '<p>//call method with name and number.</p>\n\n<pre><code>-(void)openMessageViewWithName:(NSString*)contactName withPhone:(NSString *)phone{\n\nCTTelephonyNetworkInfo *networkInfo=[[CTTelephonyNetworkInfo alloc]init];\n\nCTCarrier *carrier=networkInfo.subscriberCellularProvider;\n\nNSString *Countrycode = carrier.isoCountryCode;\n\nif ([Countrycode length]&gt;0)     //Check If Sim Inserted\n{\n\n    [self sendSMS:msg recipientList:[NSMutableArray arrayWithObject:phone]];\n}\nelse\n{\n\n    [AlertHelper showAlert:@"Message" withMessage:@"No sim card inserted"];\n}\n</code></pre>\n\n<p>}</p>\n\n<p>//Method for sending message</p>\n\n<pre><code>- (void)sendSMS:(NSString *)bodyOfMessage recipientList:(NSMutableArray *)recipients{  \n MFMessageComposeViewController *controller1 = [[MFMessageComposeViewController alloc] init] ;\n controller1 = [[MFMessageComposeViewController alloc] init] ;\n if([MFMessageComposeViewController canSendText])\n{\n    controller1.body = bodyOfMessage;\n    controller1.recipients = recipients;\n    controller1.messageComposeDelegate = self;\n    [self presentViewController:controller1 animated:YES completion:Nil];\n }\n}\n</code></pre>\n'}, {'answer_id': 29339702, 'author': 'parvind', 'author_id': 452344, 'author_profile': 'https://Stackoverflow.com/users/452344', 'pm_score': 0, 'selected': False, 'text': '<p>You need to use the <strong>MFMessageComposeViewController</strong> if you want to show creating and sending the message in your own app.</p>\n\n<p>Otherwise, you can use the <strong>sharedApplication</strong> method.</p>\n'}, {'answer_id': 30410240, 'author': 'thomasdao', 'author_id': 1468878, 'author_profile': 'https://Stackoverflow.com/users/1468878', 'pm_score': 3, 'selected': False, 'text': '<p>Here is the Swift version of code to send SMS in iOS. Please noted that it only works in real devices. Code tested in iOS 7+. You can read more <a href="http://cungcode.com/how-to-send-sms-programmatically-ios/" rel="noreferrer">here</a>.</p>\n\n<p>1) Create a new Class which inherits MFMessageComposeViewControllerDelegate and NSObject:</p>\n\n<pre><code>import Foundation\nimport MessageUI\n\nclass MessageComposer: NSObject, MFMessageComposeViewControllerDelegate {\n    // A wrapper function to indicate whether or not a text message can be sent from the user\'s device\n    func canSendText() -&gt; Bool {\n        return MFMessageComposeViewController.canSendText()\n    }\n\n    // Configures and returns a MFMessageComposeViewController instance\n    func configuredMessageComposeViewController(textMessageRecipients:[String] ,textBody body:String) -&gt; MFMessageComposeViewController {\n        let messageComposeVC = MFMessageComposeViewController()\n        messageComposeVC.messageComposeDelegate = self  //  Make sure to set this property to self, so that the controller can be dismissed!\n        messageComposeVC.recipients = textMessageRecipients\n        messageComposeVC.body = body\n        return messageComposeVC\n    }\n\n    // MFMessageComposeViewControllerDelegate callback - dismisses the view controller when the user is finished with it\n    func messageComposeViewController(controller: MFMessageComposeViewController!, didFinishWithResult result: MessageComposeResult) {\n        controller.dismissViewControllerAnimated(true, completion: nil)\n        }\n}\n</code></pre>\n\n<p>2) How to use this class:</p>\n\n<pre><code>func openMessageComposerHelper(sender:AnyObject ,withIndexPath indexPath: NSIndexPath) {\n    var recipients = [String]()\n\n    //modify your recipients here\n\n    if (messageComposer.canSendText()) {\n        println("can send text")\n        // Obtain a configured MFMessageComposeViewController\n        let body = Utility.createInvitationMessageText()\n\n        let messageComposeVC = messageComposer.configuredMessageComposeViewController(recipients, textBody: body)\n\n        // Present the configured MFMessageComposeViewController instance\n        // Note that the dismissal of the VC will be handled by the messageComposer instance,\n        // since it implements the appropriate delegate call-back\n        presentViewController(messageComposeVC, animated: true, completion: nil)\n    } else {\n        // Let the user know if his/her device isn\'t able to send text messages\n        self.displayAlerViewWithTitle("Cannot Send Text Message", andMessage: "Your device is not able to send text messages.")\n    }\n}\n</code></pre>\n'}, {'answer_id': 47492199, 'author': 'Максуд Даудов', 'author_id': 6835150, 'author_profile': 'https://Stackoverflow.com/users/6835150', 'pm_score': 1, 'selected': False, 'text': '<p>You can present MFMessageComposeViewController, which can send SMS, but with user prompt(he taps send button). No way to do that without user permission. On iOS 11, you can make extension, that can be like filter for incoming messages , telling iOS either its spam or not. Nothing more with SMS cannot be done</p>\n'}]
['https://Stackoverflow.com/questions/10848', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']