Tutorial details

Sending A SMS | App Code for Sale | Preview

Sending A SMS | iOS Tutorial

How to send an sms text message from your app

Overview PAGE TOP

Reference: http://www.geekylemon.com/xcode-sms-sending

In this tutorial i will be showing you how to send an sms text message from your app


  • 1 Button

This is a great feature for sharing information from user to user from your app wether its there score from your game or general download this app link

ViewController.h PAGE TOP

#import <UIKit/UIKit.h>
#import "MessageUI/MessageUI.h"

@interface ViewController : UIViewController <MFMessageComposeViewControllerDelegate> {

- (IBAction)SendASMS:(id)sender;


ViewController.m PAGE TOP

@implementation ViewController
- (IBAction)SendASMS:(id)sender {
MFMessageComposeViewController *textComposer = [[MFMessageComposeViewController alloc] init];
[textComposer setMessageComposeDelegate:self];
if ([MFMessageComposeViewController canSendText]) {
[textComposer setRecipients:[NSArray arrayWithObjects: nil]];
[textComposer setBody:@""];
[self presentViewController:textComposer animated:YES completion:NULL];
} else {
NSLog(@"Can't Open Text");

- (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result
switch (result) {
case MessageComposeResultCancelled:
case MessageComposeResultFailed:
case MessageComposeResultSent:
[self dismissViewControllerAnimated:YES completion:NULL];

Reference PAGE TOP


0 Comments Leave a comment

Please login in order to leave a comment.

Newest first

to your Chupamobile Account.

The Easiest way to Launch your next App or Game.

Join Chupamobile and get instant access to thousands of ready made App and Game Templates.

Creating an account means you’re okay with Chupamobile’s Terms of Service and Privacy Policy.