Before you begin
- Register a QuickBlox account. This is a matter of a few minutes and you will be able to use this account to build your apps.
- Configure QuickBlox SDK for your app. Check out Setup page for more details.
- Create a user session to be able to use QuickBlox functionality. See Authentication page to learn how to do it.
- Connect to the Chat server. See Connection page to learn how to do it.
Access contact list
The following function gives you access to all contact list items.Add user to your contact list
To add a user to the contact list, use the following snippet.Maximum number of contacts is 300.
QBChat
instance will call its delegate’s chatDidReceiveContactAddRequest(fromUser:)
method and the user will receive the request to be added to the contact list.
Confirm the contact request
To confirm the request, useconfirmAddContactRequest()
method.
QBChat
instance will call chatDidReceiveAcceptContactRequest(fromUser:)
delegate method and this user will be informed that you have accepted the contact request.
Reject the contact request
To reject the request, use therejectAddContactRequest()
method.
QBChat
instance will call its chatDidReceiveRejectContactRequest(fromUser:)
delegate method and this user will be informed that you have declined the contact request.