Skip to content

Latest commit

 

History

History
52 lines (31 loc) · 1.03 KB

3.4.md

File metadata and controls

52 lines (31 loc) · 1.03 KB
Checklist:
  • Use with new Google SDK
  • Test login (facebook, github, twitter)
  • Fix demo app

Installation

Add this line to your application's Gemfile:

gem 'motion-firebase', github: 'soyoh/motion-firebase', branch: 'google-sdk'

And then execute:

$ bundle

To install the required Pods execute:

$ rake pod:install

Configuration

  1. Sign for an account in Firebase

  2. Create the project, and export the file GoogleService-info.plis and place it inside your Resources directory This will load the needed information for the Firebase pods.

  3. Place this inside your app_delegate.rb

  Firebase.configure

Database queries

  firebase = Firebase.database(path: 'posts')

path is optional. you dont have to specify the full URL to get, just to provide the path is sufficient for example: messages, posts, post/1, users/pepito

Auth

  Firebase.auth

  Firebase.auth.authenticated?
  Firebase.auth.logout