/ SDKs / iOS
SDKs
Chat SDKs iOS v4
Chat SDKs iOS
Chat SDKs
iOS
Version 4

List all scheduled messages

Copy link

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.
    }
}