Ask tech team
From QuickBlox Developers (API docs, code samples, SDK)
Jump to: navigation, search


Deprecation notice

Deprecation notice

This documentation is outdated, the newest version of the documentation is now maintained at


Project homepage on GIT:

Clone source code via Terminal (the way we recommend):

git clone

or download ZIP:


Apache Cordova (PhoneGap) chat code sample that shows how to work with QuickBlox Chat API through JavaScript SDK.
It allows to integrate 1:1 and group chats into your Cordova application.

Platforms support

Browser iOS Android
+ + +

We didn't check it on other Cordova environments, feel free to do it.


Integration details

Steps to build this code sample from scratch:

1. Create Cordova app:

cordova create HelloTextChat

2. Copy content from samples/chat to www folder of your Cordova app.

3. Add platforms:

cordova platform add ios --save
cordova platform add android --save
cordova platform add browser --save

4. Install WebSocket-for-Android plugin to support WebSockets on Android < 4.4

5. Install cordova-plugin-device

6. Install cordova-custom-config and add the following lines into config.xml (for iOS 10 to support files attachments in chat):

<platform name="ios">
  <config-file platform="ios" target="*-Info.plist" parent="NSPhotoLibraryUsageDescription">
    <string>Use camera for video calling</string>
  <config-file platform="ios" target="*-Info.plist" parent="NSCameraUsageDescription">
    <string>Use microphone for video calling</string>

7. Install iOS Deployment Tools to launch iOS apps into an iOS Device.

9. (Important!) Customise index.html file and connect QuickBlox JS framework using 'https' path.

10. To run on device use the following commands:

cordova clean ios && cordova run ios --device
cordova clean browser && cordova run browser --device
cordova clean android && cordova run android --device


The following tools will help you debug your Cordova application:

1. Safari Web inspector

2. cordova-plugin-console