---
source_url: https://www.pubnub.com/docs/chat/swift-chat-sdk/learn/chat-entities/channel-group
title: ChannelGroup object
updated_at: 2026-06-01T12:02:06.445Z
---

> Documentation Index
> For a curated overview of PubNub documentation, see: https://www.pubnub.com/docs/llms.txt
> For the full list of all documentation pages, see: https://www.pubnub.com/docs/llms-full.txt


# ChannelGroup object

`ChannelGroup` represents a collection of channels that can be subscribed to as a single unit. Subscribe to multiple channels with one call instead of managing individual subscriptions.

Publishing to a channel group is not supported - publish to each channel individually.

:::note Requires Stream Controller add-on
Enable the *Stream Controller* add-on for your key in the [Admin Portal](https://admin.pubnub.com/). Refer to the [support page](https://support.pubnub.com/hc/en-us/articles/360051974791-How-do-I-enable-add-on-features-for-my-keys-) for details.
:::

## Properties

The `ChannelGroupImpl` class implements the `ChannelGroup` protocol and has the following properties:

```swift
public final class ChannelGroupImpl: ChannelGroup {
    public let chat: ChatImpl
    public let id: String
}
```

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| id | String | Optional |  | Unique identifier for the channel group. |
| chat | ChatImpl | Optional |  | Reference to the main `Chat` object. |

## Methods

You can call the following methods on the `ChannelGroup` object.

Click on each method for more details.

* [add(channels:)](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/channels/channel-groups#add-channels)
* [addChannelIdentifiers(_:)](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/channels/channel-groups#add-channel-identifiers)
* [listChannels()](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/channels/channel-groups#list-channels)
* [remove(channels:)](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/channels/channel-groups#remove-channels)
* [removeChannelIdentifiers(_:)](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/channels/channel-groups#remove-channel-identifiers)
* [whoIsPresent()](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/channels/channel-groups#get-present-users)

## Event listeners

You can call the following event listener methods on the `ChannelGroup` object.

Click on each method for more details.

* [onMessageReceived()](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/channels/channel-groups#watch-channel-group)
* [onPresenceChanged()](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/channels/channel-groups#stream-presence)

## Use case

`ChannelGroup` methods enable:

* Subscribing to messages from multiple channels at once
* Monitoring [presence](https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/users/presence) across all channels in the group
* Dynamically adding or removing channels as users join or leave conversations
* Simplified message handling for multi-chat apps