For AI agents: the documentation index is at llms.txt. Guide pages have a markdown version at the same path with .md appended, before any query string or fragment.
Unsubscribes and removes Realtime channel from Realtime client.
removeChannel(_:) ends every stream opened on the channel. The channel is then spent: its actions throw a RealtimeError of kind .channelRemoved. Get a new channel from supabase.channel(_:).channel.unsubscribe() only leaves the topic. The channel and its streams stay, and subscribe() joins again.disconnectOnEmptyChannelsAfter (50 seconds by default). Set it to .zero in SupabaseClient.Configuration.Realtime to disconnect at once.let channel = await supabase.channel("channelId")
//...
await supabase.removeChannel(channel)
let channel = await supabase.channel("channelId")
//...
await channel.unsubscribe()