XMPP Setup Guide
The XMPP Chat SDK is a module that enables XMPP chat for the popular Chat SDK for iOS Messaging Framework.
The Chat SDK provides:
User interface
Data persistence
The XMPP module then provides a network adapter that allows the Chat SDK UI to communicate with an XMPP server.
Documentation
Since the XMPP project uses the standard Chat SDK UI, there is a lot of documentation available on the Github project pages:
Server setup
The XMPP Chat SDK supports currently supports ejabberd and OpenFire. It may also support other XMPP servers but they have not been tested.
ejabberd
First got to the ejabberd website and download the Community Version.
Follow the instructions on the ejabberd site to install ejabberd on your server.
Once the server is setup, you need to change some settings:
Enable registration
Change the ejabberd configuration conf/ejabberd.yml
Start ejabberd by going to the installation directory on your server and running:
You can check that ejabberd is up and running by logging in to the server admin:
OpenFire
Install OpenFire on your server or use a pre-installed OpenFire hosting service like the one offered by 1and1.
Once you've done that, go into the admin panel and enable in-band registration.
Then enable the search plugin.
Prosody
Make sure you have the following modules enabled:
lastactivity
disco
muc
vcard
blocklist
carbons
time
smacks
Client setup
The XMPP Chat SDK zip file contains everything you need to compile and run the project. However, a few steps are needed before you can compile the project.
iOS Setup
Use the terminal to navigate to the XcodeXMPPSwift
folder. Then run pod update
. This will install the project using Cocoapods.
Now open your app delegate and add the following code to setup the Chat SDK:
Android Setup
In your main application class setup the Chat SDK then configure the XMPP server:
Update the Android SDK and NDK locations in local.properties
Then run the app-xmpp
target.
Google Maps
Follow the instructions here.
iOS
Push Notifications
By default, push notifications are handled by Firebase Cloud Messaging. For this to work, you will need to create a Firebase account, link the project to your Firebase account and then perform some configuration steps.
iOS
Go to this link and follow steps 1 - 7.
Android
Go to this link and follow steps: 1 - 7.
Then
Go to this link and follow steps 1 - 21.
File Upload
By default, the project uses Firebase Cloud Storage to store uploaded files. To do this follow the steps under Deploy the storage rules - here.
Support
Discord: If you need support, join our Server
Email: team@sdk.chat
Last updated