CPSmsDelegate

@objc
public protocol CPSmsDelegate

An application should implement a class using this protocol and assign an instance of the class as the smsService object’s delegate in order to receive notification related to SMS messaging.

  • This delegate method is called when an inbound SMS message has been received by the backend. The application may choose to take some action upon receiving a message.

    Declaration

    Swift

    @objc
    func inboundMessageReceived(message: CPInboundMessage)

    Parameters

    message

    The received inbound message.

  • This delegate method is called when the delivery status of an SMS message sent by this client changes. The application may choose to take some action upon receiving a status update.

    Declaration

    Swift

    @objc
    func deliveryStatusChanged(status: CPMessageStatus)

    Parameters

    status

    Message status object describing the conversation and message that have changed.

  • This delegate method is called when any client using the API successfully sends an outbound SMS message. This can be used to synchronize the local client with any other activity by another client. The application may choose to take some action upon receiving a message.

    Declaration

    Swift

    @objc
    func outboundMessageSent(message: CPOutboundMessage)

    Parameters

    message

    The outbound message that was sent from some client, not necessarily this application.