isPending
A Boolean value that indicates whether the message is pending or whether it has been sent or received.
Declaration
var isPending: Bool { get }Discussion
Use this property to determine whether an MSMessage instance represents an unsent message—for example, to determine whether the conversation’s selectedMessage property refers to a message in the transcript (false) or to a message in the Messages app’s input field (true).
This property’s value is set based on the following rules:
This property is set to true when your app calls the insert(_:completionHandler:) method to place the message in the Messages app’s input field.
It’s set to false when the system calls the didStartSending(_:conversation:) method (either because the user sent the message from the input field or because you called the send(_:completionHandler:) method to send it directly).
This property is set to false on messages received from other participants.
In other words, the property is true only for the selected method of the active conversation when there’s an MSMessagesAppViewController instance in the Messages app’s input field.