Official iOS SDK for Stream Chat
Swift/iOS Chat Tutorial
The best place to start is the iOS Swift Chat Tutorial. It teaches you how to use this SDK and also shows how to make common changes.
This repo includes a fully functional example app with setup instructions. The example is available under the Example folder.
You’ll typically want to start out using the UI components, and implement your own components using the Swift Chat API as needed.
- iOS 11+
- Xcode 11.2+
- Swift 5.1
- CocoaPods 1.7+
- Carthage 0.33.0+
Stream Chat SDK consists of two frameworks:
StreamChat— the full SDK library with all UI components. Styling and deep customizations are all supported out of the box.
StreamChatCore— low-level library to use Stream Chat APIs. It includes models, presenters, notification manager and HTTP interface.
To integrate StreamChat into your Xcode project using CocoaPods, add this entry in your
If you want to use only
StreamChatCore, you can add this entry in your
In any file you’d like to use Stream Chat in, don’t forget to import the frameworks:
StreamChatCore if you are working with the low-level client:
To integrate Stream Chat into your Xcode project using Carthage, specify it in your
carthage update --platform iOS --new-resolver. This will build frameworks:
<Path to your Project>/Carthage/Build/iOS/ from where you can add them to your project and link them with your app target. Follow with these steps:
- Open your Xcode project
- Select the project in the Navigator
- Select your app target
<Path to your Project>/Carthage/Build/iOS/in Finder and find
StreamChatCore.framework, drag and drop it into
Frameworks, Libraries and Embedded Contentarea in Xcode. Do the same for
StreamChat.frameworkif you need UI components.
- After adding libraries, select “Do Not Embed” option in “Embed” section. (Right next to the library name after adding it)
Build Phasespanel in Xcode
- Click the
+button and select
New Run Script Phase
- Set the content to:
- Add to
$(SRCROOT)/Carthage/Build/iOS/StreamChat.framework(if you need UI components)
- Add to
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/StreamChat.framework(if you need UI components)
Now you can build your app and use
Swift Package Manager
You can directly add dependency in Xcode 11+ using repo url, or in your
Package.swift file, add to
.package(url: "https://github.com/GetStream/stream-chat-swift.git", from: "1.5.5"),
- Group chat
- Channel list
- Rich link preview (e.g. open graph)
- Attachments (images, videos and files)
- Commands (e.g.
- Editing messages
- Typing events
- Read events
- Opening a link in the internal browser
- Image gallery
- GIF support
- Light/Dark theme
- Style customization
- UI customization