LAST EDIT Oct 08 2021
These docs are deprecated and will be removed from the site in the near future. Refer to the most up to date version of the iOS UI Component SDK,

Your Project Settings


You need to enable Push Notifications capability in your project settings to make it work.

User Device


Add a User Device


We need to register a user device for push notifications. Add this code to add a device to a user:

Remove a User Device


When a user logged out you need to unregister his device before that to avoid sending push notifications to his old device:

Handle Push Notifications


Setup push notifications handler in your AppDelegate to navigate a user to your chat screen with a new message.

Testing if Push Notifications are Setup Correctly


If you're not sure if you've setup push notifications correctly (eg you don't always receive them, they work unreliably), please follow to setup your Keys, and to add the device id (so it's eligible to receive notifications)

You can follow these steps to make sure your config is correct and working:

  1. Clone our repo for push testing:

  2. Configure necessary fields in the iOS push testing app: App ID, App Secret, Server location

  3. Register your APNS certificate for push testing app, following the page:

  4. Run the app on a physical (real) device, grant notification permission, copy the command it outputs (by long tapping on it) and background the app

  5. Install stream-chat-cli:

  6. Run the command the iOS push testing app outputted in step 4 in your macos terminal

If done correctly, you should not see any errors after running command in step 6, and should correctly receive notification in your device.