A banner image that shows some use cases of the Chat UI library

Azure Communication UI Mobile Library for iOS - Chat

Cocoapods CocoaPods Compatible Cocoapods platforms

Latest Release

Getting Started

Get started with Azure Communication Services by using the UI Library to integrate communication experiences into your applications. For detailed instructions to quickly integrate the UI Library functionalities visit the Quick-start Documentation.

Installation

Requirements

  • iOS 14+
  • Xcode 13+
  • Swift 5.0+

Using CocoaPods

CocoaPods is a dependency manager. To set up with CocoaPods visit their Getting Started Guide. To integrate UI Mobile Library into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'AzureCommunicationUIChat', '1.0.0-beta.3'

Quick Sample

The Chat Composite requires two objects to work together, the adapter and the view. The ChatAdapter requires a communication identifier, token credential, a thread id, end point url of the chat, and an optional display name.
The ChatCompositeView is a SwiftUI view object that developers use to add to their View. It is initialized with the above adapter that you created.

let identifier = UnknownIdentifier(<ACS_IDENTIFIER>)
let communicationTokenCredential = try! CommunicationTokenCredential(token: <USER_ACCESS_TOKEN>)
self.chatAdapter = ChatAdapter(endpoint: <CHAT_ENDPOINT>,
                                 identifier: identifier,
                                 credential: communicationTokenCredential,
                                 threadId: <CHAT_THREAD_ID>,
                                 displayName: <DISPLAY_NAME>)
self.chatAdapter.connect() { _ in
    print("Chat connect completionHandler called")
}
let chatView = ChatCompositeView(with: chatAdapter)

For more details on Mobile UI Library functionalities visit the API Reference Documentation and Quickstart

Known Issues

Please refer to the wiki for known issues related to chat.