@nativescript/firebase-core
Advanced tools
Comparing version 2.5.2 to 3.0.0-alpha.0
{ | ||
"name": "@nativescript/firebase-core", | ||
"version": "2.5.2", | ||
"version": "3.0.0-alpha.0", | ||
"description": "NativeScript Firebase - Core", | ||
@@ -5,0 +5,0 @@ "main": "index", |
# @nativescript/firebase-core | ||
A plugin to initialize [FirebaseApp](https://firebase.google.com/docs/reference/android/com/google/firebase/FirebaseApp) in your app. | ||
It should be used with any of: | ||
- [@nativescript/firebase-admob](../firebase-admob/) | ||
- [@nativescript/firebase-analytics](../firebase-admob/) | ||
- [@nativescript/firebase-app-check](../firebase-app-check/) | ||
- [@nativescript/firebase-app-check-debug](../firebase-app-check-debug/) | ||
- [@nativescript/firebase-auth](../firebase-auth/) | ||
- [@nativescript/firebase-crashlytics](../firebase-analytics/) | ||
- [@nativescript/firebase-database](../firebase-database/) | ||
- [@nativescript/firebase-dynamic-links](../firebase-dynamic-links/) | ||
- [@nativescript/firebase-firestore](../firebase-firestore/) | ||
- [@nativescript/firebase-functions](../firebase-functions/) | ||
- [@nativescript/firebase-in-app-messaging](../firebase-in-app-messaging/) | ||
- [@nativescript/firebase-installations](../firebase-installations/) | ||
- [@nativescript/firebase-messaging](../firebase-messaging/) | ||
- [@nativescript/firebase-messaging-core](../firebase-messaging-core/) | ||
- [@nativescript/firebase-performance](../firebase-performance/) | ||
- [@nativescript/firebase-remote-config](../firebase-remote-config/) | ||
- [@nativescript/firebase-storage](../firebase-storage/) | ||
## Installation | ||
```cli | ||
npm install @nativescript/firebase-core | ||
``` | ||
## Configure Firebase for Android | ||
## Usage | ||
To configure Firebase for Android, visit [Add Firebase to your Android project](https://firebase.google.com/docs/android/setup) and follow the steps below. | ||
### Android | ||
Ensure `google-services.json` file located in `App_Resources/Android/src`. | ||
- [Create a Firebase project](https://firebase.google.com/docs/android/setup#create-firebase-project) | ||
### iOS | ||
Ensure `GoogleService-Info.plist` file located in `App_Resources/iOS`. | ||
- [Register your app with Firebase](https://firebase.google.com/docs/android/setup#register-app) | ||
### Initialize Default App | ||
- [Add a Firebase configuration file](https://firebase.google.com/docs/android/setup#add-config-file) : Download the `google-services.json` file and add it to `App_Resources/Android/src`. | ||
## Configure Firebase for iOS | ||
To set up Firebase for iOS, visit [Add Firebase to your Apple project](https://firebase.google.com/docs/ios/setup) and follow the steps below: | ||
- [Create a Firebase project](https://firebase.google.com/docs/ios/setup#create-firebase-project) | ||
- [Register your app with Firebase](https://firebase.google.com/docs/ios/setup#register-app) | ||
- [Add a Firebase configuration file](https://firebase.google.com/docs/ios/setup#add-config-file): Download the `GoogleService-Info.plist` file and add it to `App_Resources/iOS/`. | ||
## Use @nativescript/firebase-core | ||
### Instantiate Firebase and initialize a default app | ||
Import the `firebase` function and call it to create a NativeScript Firebase instance. Next, call the `initializeApp` method on the Firebase instance to instantiate the native [FirebaseApp](https://firebase.google.com/docs/reference/android/com/google/firebase/FirebaseApp). | ||
```ts | ||
@@ -22,3 +57,3 @@ import { firebase } from '@nativescript/firebase-core' | ||
### Initialize Secondary App | ||
#### Initialize Secondary App | ||
@@ -25,0 +60,0 @@ ```ts |
@@ -114,8 +114,4 @@ declare class FIRApp extends NSObject { | ||
readonly isAnalyticsEnabled: boolean; | ||
readonly isMeasurementEnabled: boolean; | ||
readonly isSignInEnabled: boolean; | ||
readonly libraryVersionID: string; | ||
@@ -122,0 +118,0 @@ |
@@ -58,8 +58,6 @@ declare var FIRAuthStateDidChangeInternalNotification: string; | ||
declare class FIRCoreDiagnosticsConnector extends NSObject { | ||
static alloc(): FIRCoreDiagnosticsConnector; // inherited from NSObject | ||
declare const enum FIRDailyHeartbeatCode { | ||
None = 0, | ||
static logCoreTelemetryWithOptions(options: FIROptions): void; | ||
static new(): FIRCoreDiagnosticsConnector; // inherited from NSObject | ||
Some = 2, | ||
} | ||
@@ -83,20 +81,2 @@ | ||
declare class FIRHeartbeatInfo extends NSObject { | ||
static alloc(): FIRHeartbeatInfo; // inherited from NSObject | ||
static heartbeatCodeForTag(heartbeatTag: string): FIRHeartbeatInfoCode; | ||
static new(): FIRHeartbeatInfo; // inherited from NSObject | ||
} | ||
declare const enum FIRHeartbeatInfoCode { | ||
None = 0, | ||
SDK = 1, | ||
Global = 2, | ||
Combined = 3, | ||
} | ||
declare class FIRHeartbeatLogger extends NSObject implements FIRHeartbeatLoggerProtocol { | ||
@@ -127,3 +107,3 @@ static alloc(): FIRHeartbeatLogger; // inherited from NSObject | ||
heartbeatCodeForToday(): FIRHeartbeatInfoCode; | ||
heartbeatCodeForToday(): FIRDailyHeartbeatCode; | ||
@@ -156,3 +136,3 @@ initWithAppID(appID: string): this; | ||
heartbeatCodeForToday(): FIRHeartbeatInfoCode; | ||
heartbeatCodeForToday(): FIRDailyHeartbeatCode; | ||
@@ -184,5 +164,11 @@ log(): void; | ||
declare function FIRLogDebugSwift(service: string, messageCode: string, message: string): void; | ||
declare function FIRLogWarningSwift(service: string, messageCode: string, message: string): void; | ||
declare class FIRLoggerWrapper extends NSObject { | ||
static alloc(): FIRLoggerWrapper; // inherited from NSObject | ||
static logWithLevelServiceCodeMessage(level: FIRLoggerLevel, service: string, code: string, message: string): void; | ||
static new(): FIRLoggerWrapper; // inherited from NSObject | ||
@@ -189,0 +175,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
69
128640
2009
1