Chat / iOS
Chat iOS v4
Chat iOS
Chat
iOS
Home
/
Chat
/
iOS
/
Message
This is the new Docs for Chat SDK v4 for iOS. To see the previous Docs, click here.

List all scheduled messages

Create a ScheduleMessageListQuery instance to retrieve all scheduled messages matching the specifications set by ScheduledMessageListQueryParams.

// If `CHANNEL_URL` is nil, you will get scheduled messages for all channels.
let query = SendbirdChat.createScheduledMessageListQuery(channelURL: CHANNEL_URL) { params in
    params.limit = LIMIT_PER_PAGE
    params.order = SCHEDULED_MESSAGE_LIST_ORDER
    params.reverse = REVERSE_RESULT_LIST
    params.scheduledStatusOptions = SCHEDULED_STATUS_OPTIONS
    params.messageTypeFilter = MESSAGE_TYPE_FILTER
}
query.loadNextPage { messages, error in
    guard error == nil else {
        return // Handle error.
    }
}