Installation Confused about "Installation"?
Let us know how we can improve our documentation:
Confused about "Installation"?
Let us know how we can improve our documentation:
- On This Page:
- CocoaPods
- Carthage
- Swift Package Manager
StreamChat Swift SDK supports:
iOS 11 and up
MacOS 10.15 and up
StreamChat SDK consists of two frameworks: StreamChat
and StreamChatUI
StreamChat
- the low-level library that connects & communicates with StreamChat backend.StreamChatUI
— building on top of StreamChat, it's the full SDK library with all UI components. Styling and deep customizations are all supported out of the box.
CocoaPodsCopied!Confused about "CocoaPods"?
Let us know how we can improve our documentation:
Confused about "CocoaPods"?
Let us know how we can improve our documentation:
To integrate StreamChat into your Xcode project using CocoaPods, add this entry in your Podfile
:
1
pod 'StreamChatUI', '~> 3.0-beta.4'
Then run pod install
.
If you want to use only StreamChat
, you can add this entry in your Podfile
:
1
pod 'StreamChat', '~> 3.0'
In any file you'd like to use Stream Chat in, don't forget to import the necessary library:
1
2
3
import StreamChatUI
// or
import StreamChat
CarthageCopied!Confused about "Carthage"?
Let us know how we can improve our documentation:
Confused about "Carthage"?
Let us know how we can improve our documentation:
To integrate Stream Chat into your Xcode project using Carthage, specify it in your Cartfile
:
1
github "getstream/stream-chat-swift" ~> 3.0.0-beta.4
Then run: carthage update --platform iOS --new-resolver
. It will build the frameworks: StreamChat.framework
and StreamChatUI.framework
into <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
Open
General
panelOpen
<Path to your Project>/Carthage/Build/iOS/
in Finder and findStreamChat.framework
, drag and drop it intoFrameworks, Libraries, and Embedded Content
area in Xcode. Do the same forStreamChatUI.framework
if you need UI components.After adding libraries, select "Do Not Embed" option in "Embed" section. (Right next to the library name after adding it)
Open
Build Phases
panel in XcodeClick the
+
button and selectNew Run Script Phase
Set the content to:
/usr/local/bin/carthage copy-frameworks
Add to
Input Files
:$(SRCROOT)/Carthage/Build/iOS/StreamChat.framework
$(SRCROOT)/Carthage/Build/iOS/Starscream.framework
if you need UI components:
$(SRCROOT)/Carthage/Build/iOS/StreamChatUI.framework
$(SRCROOT)/Carthage/Build/iOS/Nuke.framework
$(SRCROOT)/Carthage/Build/iOS/SwiftyGif.framework
Add to
Output Files
:$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/StreamChat.framework
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Starscream.framework
if you need UI components:
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/StreamChat.framework
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Nuke.framework
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/SwiftyGif.framework
Now you can build your app and use StreamChat
.
Swift Package ManagerCopied!Confused about "Swift Package Manager"?
Let us know how we can improve our documentation:
Confused about "Swift Package Manager"?
Let us know how we can improve our documentation:
You can directly add dependency in Xcode 11+ using repo url, or in your Package.swift
file, add to dependencies
:
1
.package(url:'https://github.com/GetStream/stream-chat-swift.git', from: '3.0'),