A helper class for listening to waitlist participant events. Provides callbacks for join, remove, accept, and reject events, and methods for managing waitlist requests.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
rtkClient |
RealtimeKitClient |
✅ | - | The RealtimeKit client instance |
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
participantJoinedCompletion |
(() -> Void)? |
❌ | nil |
Called when a participant joins the waitlist |
participantRemovedCompletion |
(() -> Void)? |
❌ | nil |
Called when a participant is removed from the waitlist |
participantRequestAcceptedCompletion |
(() -> Void)? |
❌ | nil |
Called when a waitlist request is accepted |
participantRequestRejectCompletion |
(() -> Void)? |
❌ | nil |
Called when a waitlist request is rejected |
| Method | Return Type | Description |
|---|---|---|
acceptWaitingRequest(participant:) |
Void |
Accepts a participant's waitlist request |
rejectWaitingRequest(participant:) |
Void |
Rejects a participant's waitlist request |
clean() |
Void |
Removes all registered listeners and cleans up resources |
import RealtimeKitUI
let waitlistListener = RtkWaitListParticipantUpdateEventListener(
rtkClient: rtkClient
)
waitlistListener.participantJoinedCompletion = {
print("New participant in waitlist")
}
waitlistListener.participantRemovedCompletion = {
print("Participant removed from waitlist")
}import RealtimeKitUI
let waitlistListener = RtkWaitListParticipantUpdateEventListener(
rtkClient: rtkClient
)
// Accept a waiting participant
waitlistListener.acceptWaitingRequest(participant: waitingParticipant)
// Reject a waiting participant
waitlistListener.rejectWaitingRequest(participant: waitingParticipant)