BatchLabs / Batch-ReactNative-Plugin-Sample

Sample app for Batch's React Native Plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Batch Logo

Batch React-Native Sample

Sample project using Batch.com platform built with react-native framework.

Getting Started

Prerequisites

  • Install Node & Watchman
  • Install Android Studio and platform dependencies
  • Install Xcode and platform dependencies

For more information, please follow the react-native documentation

This sample run on:

  • React 17.0.2
  • React-native 0.66.2
  • Node : 16.2.0

Installing

  1. Run npm install from the project root and install the dependencies:
npm install 
  1. Install iOS native dependencies with cocoapods from the ios folder :
 cd ios
 pod install

Setting up your APIKey

  • On iOS, look for your Info.plist and add the following:
<key>BatchAPIKey</key>
<string>YOUR_BATCH_API_KEY</string>
  • On Android, open android/app/build.gradle and add:
defaultConfig {
    ...
    resValue "string", "BATCH_API_KEY", "YOUR_BATCH_API_KEY"
}

Add you Firebase config

Add the google-services.json file to /android/app

Run

If you previously installed a global react-native-cli package, please remove it and use the built-in command line interface.

You can run the app on simulator using the react-native commands:

For iOS:

npx react-native run-ios

For Android:

npx react-native run-android

Or you can run it on a real device using Xcode or Android Studio (strongly recommended).

Built With

About

Sample app for Batch's React Native Plugin


Languages

Language:TypeScript 67.9%Language:Java 14.4%Language:Objective-C 12.2%Language:JavaScript 2.2%Language:Ruby 2.0%Language:Starlark 1.3%