Read the full tutorial here:
>> Build an iOS chat app with Swift
This example shows how to build an anonymous group chat with Swift:
This demo uses:
- CometChatPro 2.0.7
- Swift 5
- Xcode 11.2.1 or higher
To run the demo follow these steps:
- Head to CometChat Pro and create an account
- From the dashboard, create a new app called "Swift Group Chat"
- One created, click Explore
- Go to the API Keys tab and click Create API Key
- Create an API key called "Swift Group Chat Key" with Full Access
- Download the repository here or by running
git clone https://github.com/cometchat-pro-tutorials/ios-chat-using-swift.git
. - Navigate to project directory and use
pod install
command to install the pods and open CometChat.xcworkspace in Xcode. - Update the
Constants
in ChatService.swift with your newly-created app ID , API key and Region code. - Run the app and login with one of the test users: superhero1, superhero2, superhero3, superhero4 or superhero5
Questions about running the demo? Open an issue. We're here to help ✌️