facebook How to get started with QuickBlox React Native SDK

How to get started with QuickBlox React Native SDK

Oleksandr Shvetsov
1 Nov 2019
QuickBlox ReactNative SDK

One of the most appealing sides of React Native framework is that you only have to build your app at once using JavaScript. React Native means two times lower costs for building and maintenance. It has a large community and a variety of libraries in native languages. It is similar in structure to React.js, so it is easy for web developers to work with it.

React Native makes use of native Objective-C/Swift and Java/Kotlin ingredients. They help native-like UI and boost performance in intensive operations. Yet, you can’t reuse native modules across different platforms.

We have recently announced the release of the Quickblox React Native SDK. Today we have prepared a step-by-step guide on building a messenger app with it. You are welcome to download Quickblox React Native SDK. It is in beta now, and we are ready to hear the feedback and improve our SDK according to your proposals.

Why do you need QuickBlox React Native SDK?

QuickBlox React Native SDK offers you all you need to build a chat messaging app. Our toolkit contains helpful methods for implementing the following functionality:

  • Authentication. Upon the user logins to the application, the application starts a secure session. The token is valid for 2 hours after the last API request and is automatically renewed.
  • Users. SDK has all the necessary toolset for secure storing, managing and updating the user information.
  • Chat. For our messaging API, we use the XMPP protocol. Using the toolkit, you can manage the connection to chat server and managing 1-1 and group dialogs.
  • Content. This module allows to store attachments and manage the content.
  • Push Notifications. Push messages help you to keep in touch with the users who are not currently online. Using QuickBlox React Native SDK you can integrate push messaging into your Android or iOS app.
  • Custom Objects. The Custom Objects module provides all you need to manage and update your records.

How to create a React Native app using QuickBlox SDK?

Getting started

To create a new React Native chat messaging app with QuickBlox SDK from scratch follow these steps:

  1. Install Node.js
  2. Install React Native
  3. If you’re on MacOS – install CocoaPods
  4. Run react-native init AwesomeChatApp to create a new project
  5. Navigate to created project and install JS dependencies with npm install
  6. Add QuickBlox SDK to dependencies with npm install quickblox-react-native-sdk --save
  7. If you’re on MacOS – install Pods: enter ios folder and run pod install

You’re done with dependencies!

Launching the app

Now you can start the app with react-native run-android or react-native run-ios

But the application created is not really a chat messenger yet, right? So now you should create some UI for messages and then use our SDK to make it alive!

To make SDK work you should use your QuickBlox application account. To create a QuickBlox application, follow the steps below:

  1. Register a new account at https://admin.quickblox.com/signup. Type in your email and password to sign in. You can also sign in with your Google or Github accounts.
  2. Create the application clicking New app button.
  3. Configure the application. Type in the information about your organization into corresponding fields and click the Add button.
  4. Go to the screen with credentials. Locate Credentials groupbox and copy your Application ID, Authorization Key, Authorization Secret and Account Key. These data needed to run your application on QuickBlox server.

Now, it’s time to turn on the QuickBlox SDK:

Now you should sign in and connect to chat:

Once you signed in you can connect:

Great! Now since you’re connected to chat – it’s time to send a message to someone. Let’s create a new dialog:

In order to receive new messages we should tell SDK to send us events when there are new messages in chat:

But how will we handle new messages? We should probably assign an event handler:

So, now we have a dialog, we subscribed for new messages and created function to handle incoming messages. Let’s send our first message:

That’s it!


QuickBlox React Native SDK is here to speed up the process of messaging app development – from designing the prototype to final testing. Using our toolkit, you can integrate the messenger, voice, and video calling to your app, manage the files and objects. If you have any questions or suggestions, please submit a ticket to our support team.

Share article

Subscribe for news

Get the latest posts and read anywhere.

    Thanks for subscribing!

    You will receive an email shortly to verify your subscription.

    Check out your inbox!

    Ready to get started?

    QuickBlox post-box
    QuickBlox x

    Subscribe for news

    Get the latest posts and read anywhere.

      Don’t forget to visit our social networks:

      • QuickBlox twitter
      • QuickBlox fb
      • QuickBlox linkedin
      • QuickBlox medium
      • QuickBlox git
      • QuickBlox instagram