---
title: MMSService
framework: TelephonyMessagingKit
role: symbol
role_heading: Class
platforms: [iOS 26.0+]
path: telephonymessagingkit/mmsservice
---

# MMSService

A class that provides an interface for performing MMS operations.

## Declaration

```swift
final class MMSService
```

## Mentioned in

Creating a carrier messaging app

## Overview

Overview Use the TelephonyMessagingSession property mmsService to get an instance of this class. You can then monitor the incomingMessageNotifications asynchronous sequence to receive notification of incoming messages, and the sendMessage(_:) method to send outgoing messages. The following example shows how to send an message consisting of a text portion and an image attachment. import TelephonyMessagingKit

let service = TelephonyMessagingSession.shared.mmsService

let cellularServices = try session.cellularServices let cellularServiceID = cellularServices[0].id

guard service.isViable(for: cellularServiceID) else {     return }

var recipients: [MMSHandle] = [] for phone in recipientPhoneNumbers {     recipients.append(MMSHandle(phoneNumber: phone)) } var parts: [MMSPartContent] = []

let content1 = MMSPartContent(data: text.data(using: .utf8)!,                               contentType: UTType.plainText,                               contentID: UUID().uuidString,                               disposition: .inline,                               fileName: "")

let content2 = MMSPartContent(data: imageData,                               contentType: UTType.jpeg,                               contentID: UUID().uuidString,                               disposition: .attachment,                               fileName: "Image_1.jpg")

parts.append(content1) parts.append(content2)

let content = MMSContent(parts: parts, recipients: recipients, subject: "") let msgID = MMSMessageID(rawValue: SAMPLE_MMS_MESSAGE_ID)

let message = MMSMessage(cellularServiceID: cellularServiceID,                          messageID: msgID,                          content: content)

Task {     do {         try await service.sendMessage(message:message)         // Handle MMS send success.     } catch {         // Handle MMS send failure.     } }

To receive messages, iterate over the incomingMessageNotifications asynchronous sequence, and retrieve messages from each notification as it arrives, as shown below: import TelephonyMessagingKit

let service = TelephonyMessagingSession.shared.mmsService

let incomingMessageNotifications = try service.incomingMessageNotifications Task {     for await notification in incomingMessageNotifications {         let receivedMessage = notification.message         // Process receivedMessage.     } }

## Topics

### Determining service viabililty

- [isViable(for:)](telephonymessagingkit/mmsservice/isviable(for:).md)
- [viabilityNotifications](telephonymessagingkit/mmsservice/viabilitynotifications.md)
- [MMSService.ViabilityNotification](telephonymessagingkit/mmsservice/viabilitynotification.md)

### Managing MMS configuration

- [configuration(for:)](telephonymessagingkit/mmsservice/configuration(for:).md)
- [MMSService.Configuration](telephonymessagingkit/mmsservice/configuration.md)

### Sending messages

- [sendMessage(_:)](telephonymessagingkit/mmsservice/sendmessage(_:).md)
- [MMSMessage](telephonymessagingkit/mmsmessage.md)

### Receiving messages

- [CellularServiceID](telephonymessagingkit/cellularserviceid.md)
- [MMSMessageID](telephonymessagingkit/mmsmessageid.md)
- [incomingMessageNotifications](telephonymessagingkit/mmsservice/incomingmessagenotifications.md)
- [MMSService.IncomingMessageNotification](telephonymessagingkit/mmsservice/incomingmessagenotification.md)

### Reporting spam

- [reportSpam(_:)](telephonymessagingkit/mmsservice/reportspam(_:).md)

### Handling errors

- [MMSService.Error](telephonymessagingkit/mmsservice/error.md)

### Deprecated symbols

- [receiveMessage(using:messageID:)](telephonymessagingkit/mmsservice/receivemessage(using:messageid:).md)

## Relationships

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Using Multimedia Messaging Service (MMS)

- [mmsService](telephonymessagingkit/telephonymessagingsession/mmsservice.md)
