Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

nativescript-plugin-firebase-updated

eddyverbruggen252MIT2210.4.0TypeScript support: included

Fire. Base. Firebase!

ecosystem:nativescript, NativeScript, Firebase, Firestore, Database, Authentication, Push Notifications, Notifications, Messaging, Remote Configuration, Storage, Crashlytics, Analytics, Facebook, Google, AdMob, In-App Messaging, Performance Monitoring, Dynamic Links, ML Kit, Machine Learning, Barcode Scanning, Face Detection, Image Labeling, Landmark Recognition, Smart Reply, Natural Language, Custom Model, Text Recognition

readme

NativeScript Firebase plugin

Build Status NPM version Downloads TotalDownloads Twitter Follow

Firebase

Plugin version 10.0.0 works with NativeScript 5.2+, and 6.1+ is recommended. Using an older version? Stick to plugin version < 10.

Features

Prerequisites

Head on over to https://console.firebase.google.com/ and sign up for a free account. Your first 'Firebase' will be automatically created and made available via an URL like https://n-plugin-test.firebaseio.com.

Open your Firebase project at the Google console and click 'Add app' to add an iOS and / or Android app. Follow the steps (make sure the bundle id is the same as your nativescript.id in package.json and you'll be able to download:

  • iOS: GoogleService-Info.plist which you'll add to your NativeScript project at app/App_Resources/iOS/GoogleService-Info.plist

  • Android: google-services.json which you'll add to your NativeScript project at app/App_Resources/Android/google-services.json

Note: for using separate versions of these files for development and production environments see this section

Installation

If you rather watch a (slightly outdated) video explaining the steps then check out this step-by-step guide - you'll also learn how to add iOS and Android support to the Firebase console and how to integrate anonymous authentication: YouTube demo

From the command prompt go to your app's root folder and execute:

tns plugin add nativescript-plugin-firebase

This will launch an install script which will guide you through installing additional components. Check the doc links above to see what's what. You can always change your choices later.

Want to use this plugin with an external push notification provider and not use any Firebase feature? Just answer 'y' to the first question to skip most of them, and️ hop on over to the Push Notification. Do not run the plugin's .init function in this case!

Using NativeScript SideKick? Then the aforementioned install script will not (be able to) run. In that case, running the app for Android will result in this issue. To fix that, see this comment.

Config

If you choose to save your config during the installation, the supported options may be saved in the firebase.nativescript.json at the root of your app. This is to ensure your app may roundtrip source control and installation on CI won't prompt for user input during installation.

You can reconfigure the plugin by going to the node_modules/nativescript-plugin-firebase and running npm run config.

You can also change the configuration by deleting the firebase.nativescript.json and reinstalling the plugin.

Using Vue?

Please update your NativeScript-Vue template to 2.0 because it aligns perfectly with this plugin (because that template is now much more similar to a regular NativeScript project).

If you want a demo using Vue and Firestore, then check out this project, if you want one with Realtime DB, check out this one.

iOS (Cocoapods)

The Firebase iOS SDK is installed via Cocoapods, so run pod repo update from the command prompt (in any folder) to ensure you have the latest spec.

Google Play Services Version

The plugin will default to this version of the Android play-services-base SDK. If you need to change the version (to for instance the latest version), you can add a project ext property googlePlayServicesVersion to app/App_Resources/Android/app.gradle:

project.ext {
    googlePlayServicesVersion = "+"
}

Usage

Demo app

If you want a quickstart, clone the repo, then:

  • cd src.
  • npm i (just answer 'n' to any prompts as they are ignored anyway).
  • npm run demo.ios or npm run demo.android (answer 'n' again if prompted).

Start-up wiring

We need to do some wiring when your app starts, so open app.js and add this before application.start();:

JavaScript
var firebase = require("nativescript-plugin-firebase");

firebase.init({
  // Optionally pass in properties for database, authentication and cloud messaging,
  // see their respective docs.
}).then(
    function () {
      console.log("firebase.init done");
    },
    function (error) {
      console.log("firebase.init error: " + error);
    }
);

TypeScript

const firebase = require("nativescript-plugin-firebase");

firebase.init({
  // Optionally pass in properties for database, authentication and cloud messaging,
  // see their respective docs.
}).then(
  () => {
    console.log("firebase.init done");
  },
  error => {
    console.log(`firebase.init error: ${error}`);
  }
);

Angular

Because of the specifics of the angular bootstrap it is best to initalize firebase once the angular application is running. For example your main compoment's ngOnInit method:

const firebase = require("nativescript-plugin-firebase");

@Component({
    // ...
})
export class AppComponent implements OnInit {
  ngOnInit() {
    firebase.init({
      // Optionally pass in properties for database, authentication and cloud messaging,
      // see their respective docs.
    }).then(
      () => {
        console.log("firebase.init done");
      },
      error => {
        console.log(`firebase.init error: ${error}`);
      }
    );
  }
}

Known issues on iOS

Trouble running on the simulator

Open or create App_Resources/iOS/<appname>.entitlements and add these two keys with the value true:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.keystore.access-keychain-keys</key>
    <true/>
    <key>com.apple.keystore.device</key>
    <true/>
</dict>
</plist>

Authentication failed: invalid_token

On the simulator you may see this message if you have more than one app with the Firebase SDK ever installed:

[FirebaseDatabase] Authentication failed: invalid_token (Invalid claim 'aud' in auth token.)
or
[FirebaseDatabase] Authentication failed: invalid_token (audience was project 'firegroceries-904d0' but should have been project 'your-firebase-project')

This is a known issue in the Firebase SDK. I always use a real device to avoid this problem, but you can pass an 'iOSEmulatorFlush' option to init.

firebase.init({
  // Optionally pass in properties for database, authentication and cloud messaging,
  // see their respective docs and 'iOSEmulatorFlush' to flush token before init.
  iOSEmulatorFlush: true
}).then()

Pod dependency error

If you see an error like Unable to satisfy the following requirements: Firebase (~> 3.17.0) required by Podfile, then run pod repo update on the command line to make sure you have the latest Podspec.

This could happen when updating the plugin to a new version. You'll want to tns platform remove ios && tns platform add ios as well to clean out the old pod version.

Known issues on Android

Genymotion

You can use the awesome Genymotion emulator but you'll need to install Google Play Services on it or you'll run into errors during authentication.

DexIndexOverflowException

com.android.dex.DexIndexOverflowException: method ID not in..

Congrats, you ran into this issue which can be solved by adding multiDexEnabled true to your app/App_Resources/Android/app.gradle so it becomes something like this:

android {  
  defaultConfig {  
    applicationId = "__PACKAGE__"  
    multiDexEnabled true
    generatedDensities = []
  }  
  aaptOptions {  
    additionalParameters "--no-version-vectors"  
  }  
}

java.lang.OutOfMemoryError: GC overhead limit exceeded

Increase the Java Max Heap Size like this (the bit at the end):

android {  
  defaultConfig {  
    applicationId = "__PACKAGE__"  
    multiDexEnabled true
    generatedDensities = []
  }
  aaptOptions {  
    additionalParameters "--no-version-vectors"  
  }
  dexOptions {
    javaMaxHeapSize "4g"
  }
}

FirebaseApp with name [DEFAULT] doesn't exist

Another possible error is "FirebaseApp with name [DEFAULT] doesn't exist." which will be solved by placing google-services.json to platforms/android/google-services.json (see above), and making the changes to build.gradle which are mentioned above as well.

Errors regarding API level 26.0.0

Update your local Android SDKs:

Just run $ANDROID_HOME/tools/bin/sdkmanager --update from a command prompt or launch the SDK manager from Android Studio, expand Extras and install any pending updates.

Found play-services:A.C.D, but version B.X.Y is needed..

Update your Android bits like the issue above and reinstall the android platform in your project.

include.gradle: Failed to apply plugin .. For input string: "+"

You probably have another plugin depending on Google Play Services (Google Maps, perhaps). We need to pin to a specific play services version to play nice with others, so open app/App_Resources/Android/app.gradle and add:

android {  
  // other stuff here

  project.ext {
    googlePlayServicesVersion = "15.0.0"
  }
}

Where "15.0.0" is best set to the same value as the googlePlayServicesVersion value in this file.

Separation of Environments

It is possible to use different development and production environments by using multiple GoogleService-Info.plist and google-services.json files.

Setup

  1. Create two separate Firebase projects (e.g. myproject and myproject-dev) and configure them with the same package name
  2. Download the plist and json files for both projects and put them in the relevant directories with either .dev or .prod appended to the file names, so you have the following files in place:

    • iOS
      • app/App_Resources/iOS/GoogleService-Info.plist.dev
      • app/App_Resources/iOS/GoogleService-Info.plist.prod
    • Android
      • app/App_Resources/Android/google-services.json.dev
      • app/App_Resources/Android/google-services.json.prod

Note: if you currently have the storageBucket property in the firebase.init() then remove it (not mandatory anymore as of version 6.5.0 of this plugin), so it will be taken automatically from the relevant google services plist and json files.

Build

The build hooks of this plugin will now choose either the dev or the prod version of your google services plist and json files depending on how you run your build:

  • prod will be selected if you run with either the --release, --env.prod or --env.production flags
  • dev will be selected if you do not run with any of the above flags

Note: if you do not have both dev and prod files in place, the regular GoogleService-Info.plist and google-services.json files will be used.

changelog

Firebase

10.4.0 (2020, Feb 10)

Fixes & Enhancements

Make sure to run a pod repo update on your dev machine, because this version includes the latest Firebase iOS (and Android) SDKs.

10.3.3 (2019, Dec 24)

Fixes & Enhancements

10.3.2 (2019, Dec 11)

Fixes & Enhancements

10.3.1 (2019, Dec 6)

Fixes & Enhancements

10.3.0 (2019, Dec 2)

Fixes & Enhancements

10.2.1 (2019, Nov 26)

Fixes & Enhancements

10.2.0 (2019, Nov 18)

Fixes & Enhancements

10.1.1 (2019, Oct 29)

Fixes & Enhancements

10.1.0 (2019, Oct 18)

Fixes & Enhancements

10.0.2 (2019, Oct 16)

Fixes & Enhancements

10.0.1 (2019, Sep 30)

Fixes & Enhancements

10.0.0 (2019, Sep 17)

Fixes & Enhancements

Make sure to run a pod repo update on your dev machine, because this version includes the latest Firebase iOS (and Android) SDKs.

This version requires a minimum version of NativeScript 5.2. For MLKit features on iOS it's recommended to use a minimum tns-ios version of 6.1.0, otherwise you may run into build issues.

9.1.1 (2019, Aug 27)

Fixes & Enhancements

9.1.0 (2019, Aug 19)

Fixes & Enhancements

Make sure to run a pod repo update on your dev machine, because this version includes the latest Firebase iOS (and Android) SDKs.

9.0.4 (2019, July 22)

Fixes & Enhancements

9.0.3 (2019, July 10)

Fixes & Enhancements

9.0.2 (2019, July 9)

Fixes & Enhancements

9.0.1 (2019, June 18)

Fixes & Enhancements

9.0.0 (2019, June 18)

Fixes & Enhancements

BREAKING CHANGES

fetchProvidersForEmail has been removed - use fetchSignInMethodsForEmail instead.

Firebase Invites has been removed - use Dynamic Links instead! Also see https://firebase.google.com/docs/invites/deprecation and https://firebase.google.com/docs/dynamic-links/use-cases/user-to-user

Firebase crash reporting has been removed from the SDKs. Use Crashlytics instead. This also means firebase.sendCrashLog is gone. Use firebase.crashlytics.sendCrashLog() instead.

If you're on NativeScript < 5.2 and target iOS, then it's recommended to stick with a plugin version < 9.0.0 because you may run into incompatibilities with certain features.

Also, make sure to run a pod repo update on your dev machine, because this version includes the latest Firebase iOS SDKs.

8.3.2 (2019, May 14)

Fixes & Enhancements

8.3.1 (2019, May 7)

Fixes & Enhancements

8.3.0 (2019, May 2)

Fixes & Enhancements

8.2.1 (2019, April 17)

Fixes & Enhancements

8.2.0 (2019, April 10)

Fixes & Enhancements

Note: The Firebase iOS SDK now requires Xcode 10.1 or later.

Also note that there's a little breaking change that's easy to fix: the name and profileImageURL properties of the login result object have new names: displayName and photoURL respectively.

8.1.1 (2019, March 24)

Fixes & Enhancements

8.1.0 (2019, March 24)

Fixes & Enhancements

8.0.1 (2019, March 16)

Fixes & Enhancements

8.0.0 (2019, February 26)

Fixes & Enhancements

BREAKING CHANGES

  • getAuthToken no longer returns a token (string), but an GetAuthTokenResult object which contains more data. See #1008.
  • For better alignment with the Web API, changePassword is now updatePassword, resetPassword is now sendPasswordResetEmail. See #1080.

7.7.0 (2019, January 20)

Fixes & Enhancements

7.6.1 (2019, January 8)

Fixes & Enhancements

7.6.0 (2018, December 21)

Fixes & Enhancements

7.5.1 (2018, December 15)

Fixes & Enhancements

7.5.0 (2018, December 15)

Fixes & Enhancements

7.4.6 (2018, December 10)

Fixes & Enhancements

7.4.5 (2018, December 10)

Fixes & Enhancements

7.4.4 (2018, December 8)

Fixes & Enhancements

7.4.3 (2018, December 3)

Fixes & Enhancements

7.4.2 (2018, November 16)

Fixes & Enhancements

7.4.1 (2018, November 10)

Fixes & Enhancements

7.4.0 (2018, November 9)

Fixes & Enhancements

7.3.0 (2018, October 24)

Fixes & Enhancements

7.2.0 (2018, October 19)

Fixes & Enhancements

7.1.6 (2018, October 12)

Fixes & Enhancements

7.1.5 (2018, October 10)

Fixes & Enhancements

7.1.4 (2018, October 9)

Fixes & Enhancements

7.1.3 (2018, October 8)

Fixes & Enhancements

7.1.2 (2018, October 2)

Fixes & Enhancements

7.1.1 (2018, September 30)

Fixes & Enhancements

7.1.0 (2018, September 26)

Fixes & Enhancements

7.0.1 (2018, September 21)

Fixes & Enhancements

7.0.0 (2018, September 19)

Fixes & Enhancements

6.8.1 (2018, September 14)

Fixes & Enhancements

6.8.0 (2018, September 12)

Fixes & Enhancements

6.7.0 (2018, September 3)

Fixes & Enhancements

6.6.0 (2018, August 28)

Fixes & Enhancements

6.5.0 (2018, August 16)

Fixes & Enhancements

6.4.1 (2018, July 28)

Fixes & Enhancements

6.4.0 (2018, July 3)

Fixes & Enhancements

6.3.0 (2018, June 23)

Fixes & Enhancements

6.2.0 (2018, June 19)

Fixes & Enhancements

6.1.1 (2018, June 8)

Fixes & Enhancements

6.1.0 (2018, June 7)

Fixes & Enhancements

6.0.2 (2018, May 16)

Fixes

  • #710 If ML Kit Face detection is selected, but not Text detection, then the iOS build will fail

6.0.1 (2018, May 16)

New

  • #699 Add ML Kit support

Fixes

  • #706 AdMob on Android may fail in NativeScript 4 because frame.topmost() is undefined

5.3.1 (2018, April 26)

Fixes

  • #684 [iOS] New Version in NPM has podfile error during build
  • #685 error TS1036: Statements are not allowed in ambient contexts

5.3.0 (2018, April 25)

New

  • #549 Basic integration of Crashlytics for iOS
  • #647 Allow standalone Analytics import

Fixes

  • #321 Crash reporting never fill
  • #543 Firebase crashlytics
  • #676 Crash logs are not appearing for android in google firebase console

5.2.0 (2018, April 2)

New

  • #648 Implement setUserId for analytics
  • #665 Add Email Link Authentication
  • #666 Add 'keywords' support to AdMob banners

Fixes

  • #462 Firebase PhoneVerification
  • #657 Login with LoginType.PHONE only completes the promise for the first time
  • #660 Notification Icon not showing on Oreo devices (Android)
  • #661 [iOS] FIRDocumentReference.onSnapshot always exists
  • #662 fix snapshot creation logic and data callback return type

5.1.8 (2018, March 1)

New

  • #633 The plugin is too picky about the name of the entitlements file

5.1.7 (2018, February 11)

New

  • #624 Get push key avoiding .then()

5.1.6 (2018, February 1)

Fixes

  • #618 iOS app crashes straight after splash screen (iOS 11.2, iPhones X, 8 & 7 on simulator)

5.1.5 (2018, January 30)

Fixes

  • #272 Unusual error message when retrieving data set and binding to layout

5.1.4 (2018, January 23)

New

  • #615 Conflict with nativescript-barcodescanner

Fixes

  • #585 Firebase Queries - “cannot read property of null” after upgrade to NS 3.4.0
  • #588 Angular 5 onAuthStateChanged never called
  • #593 JS: Error: Uncaught (in promise): Run init() first!
  • #612 Nativescript 3.4 and angular 5 - support
  • #613 Best practice to init firebase

5.1.3 (2018, January 15)

New

  • #170 Need a way to unregister push notification from Firebase
  • #609 When Google Play Services is not available, show a dialog asking the user to install it

Fixes

  • #577 Firestore References can't be parsed
  • #601 Error using admob
  • #604 Date saved to Firestore get retrieved as strings

5.1.2 (2018, January 8)

New

  • #595 Creating Observables from Firestore Documents/Collections

Fixes

  • #594 Android - Background notification causing app to crash after upgrade to 5.1.1

5.1.1 (2017, December 30)

Fixes

  • #589 Firestore: doc.exists returns true for non-existing documents
  • #564 Firebase Auth + WebPack crashing iOS application (when createUser is triggered) - BETTER FIX

5.1.0 (2017, December 30)

Fixes

  • #564 Firebase Auth + WebPack crashing iOS application (when createUser is triggered) - FIX
  • #587 Push token is not always a string

New

  • #590 Bump Firebase SDK versions

5.0.5 (2017, December 19)

Fixes

  • #581 sendEmailVerification - "Run init() first!"

5.0.4 (2017, December 8)

Fixes

  • #566 FIrebase Messages Error since 5.0.2

5.0.3 (2017, December 7)

New

  • #564 Firebase Auth + WebPack crashing iOS application (when createUser is triggered)

Fixes

  • #563 Initialization problem on 5.0.2 on iOS
  • #559 Firestore nested collections

5.0.2 (2017, December 1)

New

  • #518 Background Messages Android: fix foreground=true/false flag, removed notifications without 'from'

Revert

  • #445 Skip linking for anonymous users

5.0.1 (2017, November 28)

New

  • #553 Firebase Realtime DB and Firestore in the same app

5.0.0 (2017, November 28)

New

  • #507 Firestore anytime soon?
  • #547 Add a 'getValue' function to mimic the Web API's 'once'
  • #548 Compatibility with the Firebase Web API
  • #550 Add an Angular demo app

4.2.1 (2017, October 24)

Fixes

  • #531 [BUG] Reference Error with version 4.2.0

4.2.0 (2017, October 24)

New

  • #529 TypeScript conversion of plugin and demo, including various small bugfixes (detail in the issue).

4.1.2 (2017, October 13)

Fixes

  • #484 Fix phone authentication
  • #499 iOS background notification never show and foreground notification stop working after killing the app
  • #501 Added null check for updateCallback on query
  • #510 Add FCM data to the data key
  • #515 [FIX] iOS registerForRemoteNotifications() Now Runs on Main Thread
  • #519 Fix notifications after killing

4.1.1 (2017, September 9)

Fixes

  • #482 Update to 4.0.1 and got error: Cannot read property 'initialize' of undefined

4.1.0 (2017, September 8)

New

  • #476 Moved AdMob init to firebase.init, added AdListener to showBanner()
  • #478 Invites on Android: AppInviteApi has been deprecated
  • #479 Is anybody using the invites part? I can't get the deeplink or invitation id.

Fixes

  • #319 Unable to query by child that equals to null
  • #475 Broken firebase API broken since 8/26

4.0.6 (2017, August 23)

New

  • #443 fixed invitation sample code
  • #444 Updated how options.*.value is checked to allow booleans and numbers
  • #449 Mark init and getRemoteConfig for profiling

Fixes

  • #328 Query range with START_AT not fetching data as expected
  • #438 Query : range not working when value is number
  • #445 Skip linking for anonymous users
  • 464 'phoneNumber' is missing in login result TypeScript definition

4.0.5 (2017, July 22)

Fixes

  • #387 Fix issues
  • #434 JS: Error in firebase.init: TypeError: gson(...).toJson is not a function

4.0.4 (2017, July 16)

New

  • #420 found no keychain client entitlements" after upgrade
  • #430 Can we set screenName?

Fixes

  • #418 Logout breaking on Android when nativescript-fresco plugin is added to app

4.0.3 (2017, June 29)

Webpack fix

4.0.0, 4.0.1, 4.0.2 (2017, June 20)

Full changelog

SDK versions

  • iOS: 4.0.x
  • Android: 11.0.x

New

  • #247 Device_Token not getting to send notifications
  • #255 How to Regenerate the Firebase Cloud Messaging Token
  • #360 export fetchProvidersForEmail
  • #376 Add support for firebase phone authentication
  • #388 Check for 'init' at 'push', 'setValue', 'update' and 'query'

Fixes

  • #87 BUG Database query - range not working when value is number.
  • #186 Can't read number field where value is greater than 0
  • #227 facing issue while login with facebook :prefilling my firebase account details in facebook popup
  • #349 App crashes on iOS emulator
  • #365 IOS firebase to JSON not converting numbers with NSDecimalNumber subclass

3.12.0 (2017, June 4)

Full changelog

SDK versions

  • iOS: 3.17.0
  • Android: 10.2.x

New

  • #199 Feature request: Invites
  • #362 Add Feature Firebase Invites (Android)
  • #383 Auto-upgrade com.google.gms:google-services:3.0.0 to 3.1.0

3.11.4 (2017, April 21)

Full changelog

SDK versions

  • iOS: 3.13.x
  • Android: 10.2.x

Fixes

  • #343 Fix hanging CI builds #352

3.11.3 (2017, April 2)

Full changelog

SDK versions

  • iOS: 3.13.x
  • Android: 10.2.x

Fixes

  • #343 Update dependency of xcode > node-uuid

3.11.2 (2017, March 27)

Full changelog

SDK versions

  • iOS: 3.13.x
  • Android: 10.2.x

Fixes

  • #333 New error after fresh install; Stop at ProcessProductPackaging

3.11.1 (2017, March 23)

Full changelog

SDK versions

  • iOS: 3.13.x
  • Android: 10.2.x

New

  • #226 Cannot find how to link anonymous account to other login type
  • #316 Implemented email account linking
  • #324 Use Gson to convert javaObject to jsObject

Fixes

  • #331 CI builds may file if no entitlements file exists

3.11.0 (2017, March 22)

Full changelog

SDK versions

  • iOS: 3.13.x
  • Android: 10.2.x

Fixes

  • #304 IOS cloud notification on click not triggering addOnMessageReceivedCallback
  • #274 Cleanup AppDelegate call #274

3.10.2 (2017, March 12)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors. Also, for Android update your Google Repository in the Android SDK manager (type android on the command prompt), and for iOS do a pod repo update to fetch the latest versions from Cocoapods.

  • iOS: 3.13.x
  • Android: 10.2.x

New

  • #307 Feature Request: Support crash log API

Fixes

  • #272 Unusual error message when retrieving data set and binding to layout
  • #292 Nativescript app is not running with Firebase in IOS.

3.10.1 (2017, February 22)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors. Also, for Android update your Google Repository in the Android SDK manager (type android on the command prompt), and for iOS do a pod repo update to fetch the latest versions from Cocoapods.

  • iOS: 3.13.x
  • Android: 10.2.x

Fixes

  • #290 Don't load AdMob symbols if AdMob was not enabled in the config
  • #293 Fix postinstall when nativescript is not in the PATH
  • #294 iOS crashes when AdMob is not enabled

3.10.0 (2017, February 17)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors. Also, for Android update your Google Repository in the Android SDK manager (type android on the command prompt), and for iOS do a pod repo update to fetch the latest versions from Cocoapods.

  • iOS: 3.13.x
  • Android: 10.2.x

New

  • postinstall script enabled again, unless you're using NativeScript 2.5.0
  • #19 Conflict with nativescript-admob …
  • #55 Support for AdMob
  • #85 Google Service conflits on using nativescript-admob with this plugin
  • #284 nativescript-plugin-firebase and nativescript admob conflict
  • #286 send push notifications from app + small callback fix for push

Fixes

  • #146 Sending Data Messages without notification key.
  • #281 Fix app crash when notification structure is missing
  • #285 Plugins not uncommented in include.gradle

3.9.3 (2017, February 8)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors. Also, for Android update your Google Repository in the Android SDK manager (type android on the command prompt), and for iOS do a pod repo update to fetch the latest versions from Cocoapods.

  • iOS: 3.11.x
  • Android: 10.0.x

Fixes

  • #275 tns plugin add nativescript-plugin-firebase seems to hang forever

3.9.2 (2017, January 20)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors. Also, for Android update your Google Repository in the Android SDK manager (type android on the command prompt), and for iOS do a pod repo update to fetch the latest versions from Cocoapods.

  • iOS: 3.11.x
  • Android: 10.0.x

Fixes

  • #237 Notification message not shown when app is in the background
  • #243 iOS: Push Notifications not working in Background or when application is reopened
  • #258 iOS Notification not received in background mode
  • #264 iOS: Push Notifications not working in Background in Production

3.9.1 (2017, January 18)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors. Also, for Android update your Google Repository in the Android SDK manager (type android on the command prompt), and for iOS do a pod repo update to fetch the latest versions from Cocoapods.

  • iOS: 3.11.x
  • Android: 10.0.x

New

  • #262 Adding ability to (un/)subscribe to topics at firebase

3.9.0 (2017, January 3)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors. Also, for Android update your Google Repository in the Android SDK manager (type android on the command prompt), and for iOS do a pod repo update to fetch the latest versions from Cocoapods.

  • iOS: 3.11.x
  • Android: 10.0.x

New

  • #245 Re-Authenticate a user
  • #249 Added updateProfile method
  • #240 Crash reporting slows startup time

Fixes

  • #229 Update null doesn't remove key on Android
  • #236 iOS Image Upload Type in Firebase
  • #239 fAuth.signInWithCustomToken is not a function
  • #250 Gradle build error when nativescript-google-maps-sdk is added

3.8.5 (2016, December 23)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors. Also, for Android update your Google Repository in the Android SDK manager (type android on the command prompt), and for iOS do a pod repo update to fetch the latest versions from Cocoapods.

  • iOS: 3.9.x
  • Android: 9.8.x

Fixes

  • #217 Property 'ServerValue' does not exist on type 'typeof'
  • #233 Update package.json to allow webpack bundling

3.8.4 (2016, November 23)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors. Also, for Android update your Google Repository in the Android SDK manager (type android on the command prompt), and for iOS do a pod repo update to fetch the latest versions from Cocoapods.

  • iOS: 3.9.x
  • Android: 9.8.x

Fixes

  • #222 Let iOS handle push notifications after the app was killed in the springboard
  • #225 Still problems with push messages

3.8.3 (2016, November 21)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors. Also, for Android update your Google Repository in the Android SDK manager (type android on the command prompt), and for iOS do a pod repo update to fetch the latest versions from Cocoapods.

  • iOS: 3.9.x
  • Android: 9.8.x

New

  • #196 firebase user provider data?

Fixes

  • #205 Crash after push notification confirmation
  • #218 Error: "null is not an object (evaluating 'app.registerForRemoteNotifications')" #218

3.8.2 (2016, November 20)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors. Also, for Android update your Google Repository in the Android SDK manager (type android on the command prompt), and for iOS do a pod repo update to fetch the latest versions from Cocoapods.

  • iOS: 3.9.x
  • Android: 9.8.x

New

  • #102 Add google-services to the include.gradle file
  • #110 Version control firebase add-on services configuration?
  • #198 Some automations for Android
  • #213 Bundle postinstall script dependencies
  • #214 Send Email Verification enhancement
  • #215 Upgrade to latest Firebase SDK's
  • #216 Automate enabling iOS 10 keychain sharing

Fixes

  • #53 Error in tns build android: 'spawn gradle.bat ENOENT'
  • #211 prompt dependency breaking tns builds and a possible solution

3.7.2 (2016, November 8)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors.

  • iOS: 3.7.x
  • Android: 9.6.x

New

  • #165 Feature/Question: Is it possible to have more control over push notifications prompt

Fixes

  • #175 There's a few function params missing in the TS definition file
  • #176 Remote Config TS definition is incorrect
  • #178 Running in debug works, running in release on iOS causes crash
  • #179 Error TS2656: Exported external package typings file 'firebase.d.ts' is not a module.
  • #187 IOS facebook login crash

3.7.1 (2016, October 10)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors.

  • iOS: 3.7.x
  • Android: 9.6.x

New

Fixes

  • #154 Compatibility with Fresco
  • createUser now returns the same value on iOS and Android
  • TypeScript changes in 3.6.4 rolled back because of a few bugreports.

3.6.4 (2016, October 9)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors.

  • iOS: 3.5.x
  • Android: 9.4.0

New

  • #132 Get Firebase timestamp
  • #148 Fix for storing primitive types on Android
  • Better TypeScript support (updated firebase.ts.d).

Fixes

  • #141 Fix return result of createUser on Android
  • #156 Invoking init before app start now works for Android as well

3.6.3 (2016, September 21)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors.

  • iOS: 3.5.x
  • Android: 9.4.0

Fixes

  • #135 Xcode 8 compatibility (iOS 10 SDK)

3.6.2 (2016, September 15)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors.

  • iOS: 3.5.x
  • Android: 9.4.0

New

  • #126 When singleEvent is true return data in the promise
  • #129 Ability to remove listeners

Fixes

  • #128 On Android logEvent may cause an exception

3.6.1 (2016, September 7)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors.

  • iOS: 3.5.x
  • Android: 9.4.0

New

  • #119 Upload Progress
  • #120 Chaining range types for .query
  • #125 Analytics API

3.5.4 (2016, August 29)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors.

  • iOS: 3.4.x
  • Android: 9.4.0

Fixes

  • #107 Facebook Login does not return any result in iOS
  • #115 Facebook Authentication Redirect

3.5.3 (2016, August 20)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors.

  • iOS: 3.4.x
  • Android: 9.4.0

New

  • #104 Swap authentiction to a different Google account

Fixes

  • #105 Receiving notifications from FCM on iOS may work better now

3.5.1 (2016, August 12)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors.

  • iOS: 3.3.x
  • Android: 9.4.0

New

  • #101 Post Install script, to help making configuration easier!

3.5.0 (2016, August 9)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors.

  • iOS: 3.3.x
  • Android: 9.4.0

New

  • #92 Google Sign In, including automatic linking of Facebook-authenticated users in case email addresses match
  • #77 Allow users to pass scope for Facebook Authentication

Fixes

  • #94 Fix getDownloadUrl on Android to return string
  • #97 Trying to fix toJsObject for Android (Boolean)
  • #99 FirebaseApp with name [DEFAULT] doesn't exist (when running init before app start)

3.4.4 (2016, July 17)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors.

  • iOS: 3.3.x
  • Android: 9.2.0

New

  • #75 Nathan Walker added the ability to remove files from Firebase Storage, thanks Nathan!

3.4.3 (2016, July 16)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors.

  • iOS: 3.3.x
  • Android: 9.2.0

New

  • #74 Facebook login for Android.

3.4.2 (2016, July 14)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors.

  • iOS: 3.3.x
  • Android: 9.2.0

New

  • #61 Added keepInSync for enhanced offline support.
  • #65 Crash Reporting, which is automatically enabled for you.

Fixes

  • #68 Fix an issue where you'd log in on Android before application.start().
  • #70 Added a TypeScript definition for getCurrentUser().
  • #71 Added a TypeScript definition for LoginResult.email.

3.4.0 (2016, July 7)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors.

  • iOS: 3.3.x
  • Android: 9.2.0

New

  • #43 Storage (docs)
  • #66 Added iOSSimulatorFlush for a known iOS emulator issue with invalid_token

Fixes

  • #69 Fix onAuthStateChanged feature on init

3.3.0 (2016, June 26)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors.

  • iOS: 3.2.x
  • Android: 9.0.2

New

  • #54 FCM Messaging / Push Notifications (docs)

3.2.0 (2016, June 19)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors.

  • iOS: 3.2.0
  • Android: 9.0.2

New

3.1.0 (2016, June 17)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors.

  • iOS: 3.2.0
  • Android: 9.0.0

New

3.0.0 (2016, May 26)

Full changelog

SDK versions

If version numbers changed, clean your platform folders to avoid build errors.

  • iOS: 3.2.0
  • Android: 9.0.0

New

  • #34 Support new Firebase 3 release