-
Notifications
You must be signed in to change notification settings - Fork 3
TextReceivedEvent
Kenan Genjac edited this page Oct 23, 2023
·
2 revisions
Read-only property that represents the content of the text.
-
String
- Represents the textual content of the text for which the event has been received.
func onTextReceived(_ textReceivedEvent: TextReceivedEvent) {
os_log("The received text is %@.", textReceivedEvent.text)
}
Read-only property that represents the sender's endpoint.
-
Endpoint
- Represents the endpoint from which the received text was sent.
func onTextReceived(_ textReceivedEvent: TextReceivedEvent) {
os_log("The text has been sent by %@.", textReceivedEvent.from.identifier())
}
Read-only property that represents the isDirect
status of the text.
-
Bool
- Represents whether the received text has been sent directly to its recipient.
func onTextReceived(_ textReceivedEvent: TextReceivedEvent) {
if (textReceivedEvent.isDirect) {
os_log("The received text has been sent directly.")
}
}
Read-only property that represents the date
when the text was received.
-
Date
- Represents the date and time when the text was received.
func onTextReceived(_ textReceivedEvent: TextReceivedEvent) {
os_log("The time of receiving the text is %@.", textReceivedEvent.date)
}