---
title: canSendText()
framework: messageui
role: symbol
role_heading: Type Method
path: messageui/mfmessagecomposeviewcontroller/cansendtext()
---

# canSendText()

Returns a Boolean value that indicates whether the current device is capable of sending text messages.

## Declaration

```swift
class func canSendText() -> Bool
```

## Return Value

Return Value true if the device can send text messages or false if it cannot.

## Discussion

Discussion Always call this method before attempting to present the message compose view controller. A device may be unable to send messages if it does not support messaging or if it is not currently configured to send messages. This method applies only to the ability to send text messages via iMessage, SMS, and MMS. To be notified of changes in the availability of sending text messages, register as an observer of the MFMessageComposeViewControllerTextMessageAvailabilityDidChangeNotification notification.

## See Also

### Determining if message composition is available

- [canSendAttachments()](messageui/mfmessagecomposeviewcontroller/cansendattachments().md)
- [canSendSubject()](messageui/mfmessagecomposeviewcontroller/cansendsubject().md)
- [isSupportedAttachmentUTI(_:)](messageui/mfmessagecomposeviewcontroller/issupportedattachmentuti(_:).md)
