Socket
Socket
Sign inDemoInstall

@nativescript-asharghi/firebase-messaging

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.2.5 to 3.2.7

4

package.json
{
"name": "@nativescript-asharghi/firebase-messaging",
"version": "3.2.5",
"version": "3.2.7",
"description": "NativeScript Firebase - Messaging",

@@ -42,2 +42,2 @@ "main": "index",

}
}
}

@@ -1,2 +0,2 @@

# @nativescript/firebase-messaging
# @nativescript-asharghi/firebase-messaging

@@ -75,3 +75,3 @@ ## Contents

You need to set up your app for Firebase before you can enable Firebase Messaging. To set up and initialize Firebase for your NativeScript app, follow the instructions on the documentation of the [@nativescript/firebase-core](../firebase-core/) plugin.
You need to set up your app for Firebase before you can enable Firebase Messaging. To set up and initialize Firebase for your NativeScript app, follow the instructions on the documentation of the [@nativescript-asharghi/firebase-core](../firebase-core/) plugin.

@@ -82,12 +82,12 @@ ## Add the Firebase Cloud Messaging SDK to your app

1. Install the `@nativescript/firebase-messaging` plugin by running the following command in the root directory of your project.
1. Install the `@nativescript-asharghi/firebase-messaging` plugin by running the following command in the root directory of your project.
```cli
npm install @nativescript/firebase-messaging
npm install @nativescript-asharghi/firebase-messaging
```
2. Add the SDK by importing the `@nativescript/firebase-messaging` module. You should import this module once in your app, ideally in the main file (e.g. `app.ts` or `main.ts`).
2. Add the SDK by importing the `@nativescript-asharghi/firebase-messaging` module. You should import this module once in your app, ideally in the main file (e.g. `app.ts` or `main.ts`).
```ts
import '@nativescript/firebase-messaging';
import '@nativescript-asharghi/firebase-messaging';
```

@@ -102,4 +102,4 @@

```ts
import { firebase } from '@nativescript/firebase-core';
import { AuthorizationStatus } from '@nativescript/firebase-messaging-core';
import { firebase } from '@nativescript-asharghi/firebase-core';
import { AuthorizationStatus } from '@nativescript-asharghi/firebase-messaging-core';

@@ -176,3 +176,3 @@ async function requestUserPermission() {

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';
firebase().messaging().showNotificationsWhenInForeground = true;

@@ -188,3 +188,3 @@ ```

import { alert } from '@nativescript/core';
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';

@@ -271,6 +271,6 @@ firebase()

```ts
import { firebase } from '@nativescript/firebase-core';
import '@nativescript/firebase-messaging';
import { FieldValue } from '@nativescript/firebase-auth';
import '@nativescript/firebase-firestore';
import { firebase } from '@nativescript-asharghi/firebase-core';
import '@nativescript-asharghi/firebase-messaging';
import { FieldValue } from '@nativescript-asharghi/firebase-auth';
import '@nativescript-asharghi/firebase-firestore';

@@ -391,3 +391,3 @@ async function saveTokenToDatabase(token) {

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';

@@ -405,3 +405,3 @@ firebase()

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';

@@ -434,3 +434,3 @@ firebase()

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';

@@ -448,3 +448,3 @@ firebase()

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';

@@ -655,3 +655,3 @@ firebase()

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';

@@ -665,3 +665,3 @@ messagingAndroid: com.google.firebase.messaging.FirebaseMessaging = firebase().messaging().android;

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';

@@ -675,3 +675,3 @@ messagingIos: MessagingCore = firebase().messaging().ios;

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';
messageApp: FirebaseApp = firebase().messaging().app;

@@ -684,3 +684,3 @@ ```

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';
isAutoInitEnabled: boolean = firebase().messaging().isAutoInitEnabled;

@@ -696,3 +696,3 @@ // or

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';
showNotificationsWhenInForeground: boolean = firebase().messaging().showNotificationsWhenInForeground;

@@ -707,3 +707,3 @@ // or

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';
isDeviceRegisteredForRemoteMessages: boolean = firebase().messaging().isDeviceRegisteredForRemoteMessages;

@@ -716,3 +716,3 @@ ```

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';
firebase().messaging().getToken()

@@ -730,3 +730,3 @@ .then((token: string) => {

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';
aPNSToken: string | null = firebase().messaging().getAPNSToken()

@@ -739,3 +739,3 @@ ```

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';
firebase().messaging().hasPermission()

@@ -753,3 +753,3 @@ .then((status: AuthorizationStatus) => {

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';
firebase().messaging().onMessage(listener);

@@ -766,3 +766,3 @@ ```

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';
firebase().messaging().onNotificationTap(listener);

@@ -779,3 +779,3 @@ ```

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';
firebase().messaging().onToken(listener);

@@ -792,3 +792,3 @@ ```

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';
firebase().messaging().registerDeviceForRemoteMessages()

@@ -805,3 +805,3 @@ .then(() => {

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';
firebase().messaging().requestPermission(permissions)

@@ -822,3 +822,3 @@ .then((status: AuthorizationStatus) => {

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';
firebase().messaging().subscribeToTopic(topic)

@@ -840,3 +840,3 @@ .then(() => {

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';
firebase().messaging().unsubscribeFromTopic(topic)

@@ -858,3 +858,3 @@ .then(() => {

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';
firebase().messaging().unregisterDeviceForRemoteMessages()

@@ -871,3 +871,3 @@ .then(() => {

```ts
import { firebase } from '@nativescript/firebase-core';
import { firebase } from '@nativescript-asharghi/firebase-core';
firebase().messaging().deleteToken()

@@ -874,0 +874,0 @@ .then(() => {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc