<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSNotification/Name-swift.struct/MFMessageComposeViewControllerTextMessageAvailabilityDidChange",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@MFMessageComposeViewControllerTextMessageAvailabilityDidChangeNotification"
  },
  "title" : "MFMessageComposeViewControllerTextMessageAvailabilityDidChange"
}
-->

# MFMessageComposeViewControllerTextMessageAvailabilityDidChange

Posted when the current device’s ability to send text messages changes.

```
static let MFMessageComposeViewControllerTextMessageAvailabilityDidChange: NSNotification.Name
```

## Discussion

The system posts this notification when the value <doc://com.apple.documentation/documentation/MessageUI/MFMessageComposeViewController/canSendText()> returns has changed.

Upon receiving this notification, query its `userInfo` dictionary with the <doc://com.apple.documentation/documentation/MessageUI/MFMessageComposeViewControllerTextMessageAvailabilityKey> key. If the availability of text message sending has changed, your app should invalidate caches and update its user interface as appropriate.

---

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)