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.

Retrieve a poll

You can retrieve a specific poll by creating and passing a PollRetrievalParams object as an argument to the get() method.

let param = PollRetrievalParams()
param.channelType = channel.channelType
param.channelURL = channel.channelURL
param.pollId = poll.pollId

Poll.get(params: param) { poll, error in
    
}

PollRetrievalParams

Parameter nameTypeDescription

channelUrl

string

Specifies the URL of the channel.

channelType

channelType

Specifies the type of the channel.

pollId

Int64

Specifies the unique ID of a poll.

PollHandler

Through PollHandler, the Sendbird server always notifies whether your poll has been successfully retrieved.

public typealias PollHandler = (_ poll: Poll?, _ error: SBError?) -> Void