Chapter 7
Sending SMS and MMS Using MessageUI Framework

Not only designed for email, the MessageUI framework also provides a specialized view controller for developers to present a standard interface for composing SMS text messages within apps. While you can use the MFMailComposeViewController class for composing emails, the framework provides another class named MFMessageComposeViewController for handling text messages.

Basically the usage of MFMessageComposeViewController is very similar to the mail composer class. If you've read the previous chapter about creating emails with attachments, you will find it pretty easy to compose text messages. Anyway, I'll walk you through the usage of MFMessageComposeViewController class. Again we will build a simple app to walk you through the class.

Note: If you haven't read the previous chapter, I highly recommend you to take a look.

A Glance at the Demo App

We'll reuse the previous demo app but tweak it a bit. The app still displays a list of files in a table view. However, instead of showing the mail composer, the app will bring up the message interface with a pre-filled message when a user taps any of the files.

Figure 7.1. The demo app
Figure 7.1. The demo app

To continue reading and access the full version of the book, please get the full copy here. You will also be able to access the full source code of the project.

results matching ""

    No results matching ""