To start developing apps with react native, there are two different phases of setup required:
Setting up the npm project
Setting up each target platform (currently only iOS and android are supported)
To make the setup easier and to get started quicker, you can also use the
react-native-starter-app as your starting point. To do so, simply clone the repo from:
git clone https://github.com/mitterio/react-native-starter.git
And then run the following to install all the dependencies:
Do note that you will still have to setup your credentials with APNs and FCM before you can start consuming messages.
To setup the npm project, you simply need to add the dependencies for your project using yarn or npm:
yarn install @mitter-io/react-native @mitter-io/models
Or using npm,
npm install --save @mitter-io/react-native @mitter-io/models
For messaging support the react-native sdk uses
react-native-firebase, specifically its Cloud Messaging Module. To setup the same, follow the steps as outlined on https://rnfirebase.io/docs/v5.x.x/installation/android
NOTE If you are using the starter app as a base template, you can skip the section Install Modules in the link above.
Since cloud messaging works at a lower level than most apps, setting up the Mitter.io SDK for react native requires further setup on each of the target platforms.
Initial setup https://rnfirebase.io/docs/v5.x.x/installation/ios
Cloud messaging setup https://rnfirebase.io/docs/v5.x.x/messaging/ios
NOTE If you are using the starter app as a base template, you can skip the section Install Modules in both of the above links.
Initial setup https://rnfirebase.io/docs/v5.x.x/installation/android
Cloud messaging setup https://rnfirebase.io/docs/v5.x.x/messaging/android
The native-sdk uses
rn-fetch-blob for managing file uploads. Performing a link on the project is usually required before being able to use this package:
react-native link rn-fetch-blob
Doing the above and adding permissions from https://github.com/joltup/rn-fetch-blobshould should just work for you.
If you are facing installation problems please refer to the installation section in the following repo:
The setup for react navigation is given in the below link
The starter app uses the community developed react-native-elements package as a UI toolkit
The setup for react-native-elements is given in the below link
const mitter = Mitter.forReactNative(/* your application-id */)