Hackernoon logoPusher Chatkit, the easiest way to add chat to your apps by@madalinagrigorie

Pusher Chatkit, the easiest way to add chat to your apps

Author profile picture

@madalinagrigorieMadalina Grigorie

Communications wrangler Loves a good story. Formerly talking up devs @pusher

Our brand new product, Pusher Chatkit, is now available in Public Beta 🎉!

Whether you’re looking to add in-game player-to-player chat, live chat support, or collaborator group chat, you can do it all in record time with Chatkit. It comes packed with features that make building chat in your app a breeze:

  • Typing indicators
  • Online presence
  • Message history
  • Chatroom management
  • Granular user roles & permissions
  • Public & private rooms
  • Query API to access stored messages

Today we only provide a Chatkit SDK for iOS (Swift) but both our Android (Kotlin) and Javascript SDKs are available in preview (sneak peek here and here) and should join our Swift SDK in public beta pretty soon.

But, Why?

As we speak, 1000s of developers are adding chat to their applications, but we know that even today, building chat from scratch is not as easy as it should be. We put everything we’ve learned helping GoGuardian, YouNow, Slaask, FreshDesk and more than 7,000 other developers using our existing API to add chat functionalities to their apps.

Chatkit is our first step towards becoming a multi-product company. Our goal is to continue providing developers with building blocks that make them more productive and enable them to focus on what matters to them and their companies — building great products. We’re passionate about solving problems for developers, so keep an eye out for upcoming announcements of new product

Thanks to the team who built Chatkit: Luka Bratos, Hamilton Chapman, Charlie Cochrane, and Vivan Kumar 💪.

Show Me Some Code

Below is an example of how to integrate Chatkit in your iOS (Swift) app.

// 1. Connecting a client to the Chatkit servers
let chatManager = ChatManager(
instanceId: "your-chatkit-instance-id"
tokenProvider: yourTokenProvider

chatManager.connect(delegate: yourDelegate) { currentUser, error in
guard error == nil else {
print("Error connecting: \(error.localizedDescription)")
print("Successfully connected")

// 2. Creating a room
currentUser.createRoom(name: "my room name") { room, error in
guard error == nil else {
print("Error creating room: \(error.localizedDescription)")
print("Created room called \(room.name)")

// 3. Sending a message
currentUser.addMessage(text: "Hey guys! ", to: myRoom) { message, error in
guard error == nil else {
print("Error adding message to \(room.name): \(error.localizedDescription)")
print("Added message to \(myRoom.name)")

// 4. Receiving messages
func newMessage(message: PCMessage) {
print("Received message: \(message.text) from \(message.sender.debugDescription)")

// 5. you are done

Try it now! Sign in or create your account and access our new shiny ✨ dashboard.

Coming On The Horizon

We already have some great feedback and our product roadmap is packed with other powerful features such as:

  • Handling rich media uploading & storage for you
  • Keeping track of read receipts
  • Triggering native push notifications when users are offline
  • Releasing Android (Kotlin) & Javascript SDKs
  • Releasing server side SDKs for Go, Python, PHP
  • … and much, much more ⚡️.


The Noonification banner

Subscribe to get your daily round-up of top tech stories!