<!--
{
  "availability" : [
    "iOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TelephonyMessagingKit",
  "identifier" : "/documentation/TelephonyMessagingKit/MMSService",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "TelephonyMessagingKit"
    ],
    "preciseIdentifier" : "s:21TelephonyMessagingKit10MMSServiceC"
  },
  "title" : "MMSService"
}
-->

# MMSService

A class that provides an interface for performing MMS operations.

```
final class MMSService
```

## Overview

Use the [`TelephonyMessagingSession`](/documentation/TelephonyMessagingKit/TelephonyMessagingSession) property [`mmsService`](/documentation/TelephonyMessagingKit/TelephonyMessagingSession/mmsService) to get an instance of this class.
You can then monitor the [`incomingMessageNotifications`](/documentation/TelephonyMessagingKit/MMSService/incomingMessageNotifications) asynchronous sequence to receive notification of incoming messages, and the [`sendMessage(_:)`](/documentation/TelephonyMessagingKit/MMSService/sendMessage(_:)) method to send outgoing messages.

The following example shows how to send an message consisting of a text portion and an image attachment.

```swift
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`](/documentation/TelephonyMessagingKit/MMSService/incomingMessageNotifications) asynchronous sequence, and retrieve messages from each notification as it arrives, as shown below:

```swift
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:)`](/documentation/TelephonyMessagingKit/MMSService/isViable(for:))

Queries whether the device can perform MMS operations at this time.

[`viabilityNotifications`](/documentation/TelephonyMessagingKit/MMSService/viabilityNotifications)

An asynchronous sequence of service viability notifications produced by the service.

[`MMSService.ViabilityNotification`](/documentation/TelephonyMessagingKit/MMSService/ViabilityNotification)

A notification that indicates if MMS is viable for a given cellular service.

### Managing MMS configuration

[`configuration(for:)`](/documentation/TelephonyMessagingKit/MMSService/configuration(for:))

Retrieves the MMS configuration for the carrier.

[`MMSService.Configuration`](/documentation/TelephonyMessagingKit/MMSService/Configuration)

A structure that provides information about MMS messages sent and received using the current carrier.

### Sending messages

[`sendMessage(_:)`](/documentation/TelephonyMessagingKit/MMSService/sendMessage(_:))

Sends an MMS message to the given destination.

[`MMSMessage`](/documentation/TelephonyMessagingKit/MMSMessage)

A structure that contains the data of an MMS message.

### Receiving messages

[`CellularServiceID`](/documentation/TelephonyMessagingKit/CellularServiceID)

An opaque identifier that represents the cellular service for which to provide operations.

[`MMSMessageID`](/documentation/TelephonyMessagingKit/MMSMessageID)

A structure that represents an MMS message identifier.

[`incomingMessageNotifications`](/documentation/TelephonyMessagingKit/MMSService/incomingMessageNotifications)

An asynchronous sequence of incoming message notifications produced by the service.

[`MMSService.IncomingMessageNotification`](/documentation/TelephonyMessagingKit/MMSService/IncomingMessageNotification)

A structure that contains information about an incoming MMS message.

### Reporting spam

[`reportSpam(_:)`](/documentation/TelephonyMessagingKit/MMSService/reportSpam(_:))

Reports an MMS message as spam to the carrier and to partners.

### Handling errors

[`MMSService.Error`](/documentation/TelephonyMessagingKit/MMSService/Error)

Enumeration for errors that can occur when performing MMS operations.

### Deprecated symbols

[`receiveMessage(using:messageID:)`](/documentation/TelephonyMessagingKit/MMSService/receiveMessage(using:messageID:))

Retrieves an MMS message that matches the given identifiers.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)