SendBird helps you to implement real-time chat to any application with speed and efficiency. Our iOS SDK provides you with various methods to initialize, configure and build the chat from the client side - no server side implementation required because our reliable infra management service is delivered with the SDK. This section presents a brief overview of the SDK’s functionalities and logic, then let you go through the preliminary steps of implementing SendBird in your own application
Step 1: Create a new SendBird application in the Dashboard
The first thing to do is to sign in to the SendBird Dashboard and create a SendBird application. If you do not yet have an account, you can sign up with Google, GitHub, or create a new account.
You must create one application per service, regardless of the platform. For example, an app released in both Android and iOS requires only one application to be created in the Dashboard.
All users within the same SendBird application can communicate with each other, across all platforms. This means users using iOS, Android, web clients, etc. can all chat with one another. However, users in different SendBird applications cannot talk to each other.
Step 2-1: When building a new app
If you are developing an app from scratch, a convenient way to begin is by building your app on top of our Sample UI project.
You can open the sample project from Xcode or by running the command below.
Note: Make sure that you open
$ open sample-objc/SendBird-iOS.xcworkspace
$ open sample-swift/SendBird-iOS.xcworkspace
Build and run the Sample UI project to play around with Open Chat or Group Chat.
Note: The sample project is shipped with a Testing App ID. You must replace this with your own App ID, which is found in the SendBird Dashboard, for a production app.
Step 2-2: When integrating SendBird with an existing app
If you already have an app, do the following for integration.
Install SendBird SDK using CocoaPods
Add the lines below to your
platform :ios, '8.0' target 'YourProject' do use_frameworks! pod 'SendBirdSDK' end
Install the SendBird framework through CocoaPods.
$ pod install
Now you can run your project with the SendBird Framework by opening
*YOUR_PROJECT*.xcworkspace. If you do not want to use CocoaPods, check out the manual installation guide.
Install SendBird SDK using Carthage
github "smilefam/sendbird-ios-framework"to your
- Go to your Xcode project's General settings. Open
<YOUR_XCODE_PROJECT_DIRECTORY>/Carthage/Build/iOSin Finder and drag
SendBirdSDK.frameworkto the Embedded Binaries section in Xcode. Make sure the Copy items if needed option is selected and click Finish.
Turn on ARC
Turning on Automatic Reference Counting (ARC) is necessary to use the SendBird framework. Go to your project's Build Settings, then set the value of Objective-C Automatic Reference Counting to Yes (in Swift, Yes by default).
If you don't want to turn on ARC in a project-wide scope, then navigate to Build Phases - Compile Sources and add
-fobjc-arc to the Compiler Flags in the source file that SendBird framework uses. This means that ARC is turned on only that file.
Step 3: Using the SendBird SDK in Swift
You can use all classes and methods with just one import statement - without a bridging header file - in both Objective-C and Swift.
The Interacting with Objective-C APIs in Swift helps you with understanding how to use the SendBird SDK in Swift syntax.