Skip to content

An example app created with `react-native init`, converted to cocoapods (firebase requirement) which also includes some other useful dependencies.

Notifications You must be signed in to change notification settings

cyrkus/react-native-starter

 
 

Repository files navigation

React Native Starter

This is a fork of React Native Firebase Starter which I've taken a little bit further by installing a number of other dependencies, like:

First Time Project Setup

Install project dependencies:

yarn
cd ios
pod install

For android, make sure you either open up android studio to have it generate a android/local.properties file or that you have your ANDROID_HOME environment variable set to the location of your android sdks.

Next, be sure to setup your iOS and Android google api keys (after setting up your firebase account / project) by following step 1 in each link. Both files should already be linked up in the projects - they just are not tracked by git.

  • For iOS, copy in your GoogleService-Info.plist to the ios directory.
  • For Android, copy in your google-services.json to the android/app directory.

For React Native Maps to work, you'll need to follow step 3 of their android instructions and update the api key (YOUR_GOOGLE_MAPS_API_KEY) found in android\app\src\main\AndroidManifest.xml.

For React Native FBSDK to work, you'll need to grab a Facebook App Id from a new or existing Facebook App and update it in android/app/src/main/res/values/strings.xml by replacing {your-fb-app-id}. You will also need to replace the {your-fb-app-id} and {your-fb-app-name} in ios/firebaseExmpl/Info.plist.

Firebase database setup

This super simple example app expects you to have a root node in your database with a child of names which has a set of child nodes with random names for each value, like:

example-app -
  names -
    0 - joe
    1 - jane
    2 - john
    3 - ...

Troubleshooting Android

You may encounter The SDK Build Tools revision (23.0.1) is too low for project .... If so, just open up Android Studio and address these issues in the Gradle Sync messages panel.

You may encounter an error with the React Native FBSDK package like method does not override or implement a method from a supertype: @Override. This seems to be a bug with this package. Open up the project in Android Studio, browse to "android [react-native-fbsdk]"/src/main/java/com.facebook.reactnative.androidsdk/FBSDKPackage.java and delete the @Override on line 61 (just above the createJSModules() method - it should have a red wavey underline).

About

An example app created with `react-native init`, converted to cocoapods (firebase requirement) which also includes some other useful dependencies.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 34.0%
  • Objective-C 27.0%
  • Java 19.4%
  • Ruby 10.9%
  • Python 8.7%