Skip to content
This repository was archived by the owner on Feb 7, 2019. It is now read-only.

Commit 8d98515

Browse files
authored
Merge pull request #247 from NativeScript/tbozhikov-fix-links
fix links
2 parents f49deb4 + dc92379 commit 8d98515

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

MIGRATE-TO-FIREBASE.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Migration guide push-plugin -> Firebase plugin
2-
If you have an app that uses push-plugin for push notifications and need to switch to nativescript-plugin-firebase, this guide can help you. If you are just starting with push notifications, however, it would be best to use [Firebase plugin]("https://github.com/EddyVerbruggen/nativescript-plugin-firebase") and refer [its documentation on messaging]("https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/docs/MESSAGING.md").
2+
If you have an app that uses push-plugin for push notifications and need to switch to nativescript-plugin-firebase, this guide can help you. If you are just starting with push notifications, however, it would be best to use [Firebase plugin](https://github.com/EddyVerbruggen/nativescript-plugin-firebase) and refer [its documentation on messaging](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/docs/MESSAGING.md).
33
#### 1. Add the plugin to your app
44
Go to your app's root folder in terminal app and execute
55
```bash
@@ -8,7 +8,7 @@ tns plugin add nativescript-plugin-firebase
88
> Upon plugin installation, you'll be prompted to choose which features to use. Choose "yes" for Firebase Messaging (of course :)). By default, the plugin saves the configuration as a file (firebase.nativescript.json) to use it when reinstalling the plugin.
99
1010
#### 2. Setup
11-
Add `GoogleService-Info.plist` (for iOS) or `google-services.json` (for Android) in App_Resources/iOS (and App_Resources/Android, respectively). These are the configuration files that come from your Firebase apps. If you don't have such yet, go to https://console.firebase.google.com and create one. See [Firebase plugin's docs]("https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/docs/MESSAGING.md") for more info on initial setup.
11+
Add `GoogleService-Info.plist` (for iOS) or `google-services.json` (for Android) in App_Resources/iOS (and App_Resources/Android, respectively). These are the configuration files that come from your Firebase apps. If you don't have such yet, go to https://console.firebase.google.com and create one. See [Firebase plugin's docs](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/docs/MESSAGING.md) for more info on initial setup.
1212

1313
#### 3. Initialization prerequisite
1414
Make sure you [`require` the plugin in `app.ts` / `main.ts` / `main.aot.ts`](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/55cfb4f69cf8939f9101712fed22383196b08d36/demo/app/app.ts#L5)
@@ -23,7 +23,7 @@ const firebase = require("nativescript-plugin-firebase");
2323
app.start({ moduleName: 'main-page' });
2424
```
2525

26-
#### 4. Add some code [to handle a notification]("https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/docs/MESSAGING.md#handling-a-notification")
26+
#### 4. Add some code [to handle a notification](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/docs/MESSAGING.md#handling-a-notification)
2727

2828
EXAMPLE: The following code using push-plugin:
2929
```js
@@ -59,7 +59,7 @@ firebase.init({
5959
});
6060
```
6161
#### 5. Testing with messages
62-
To test with real messages, you can use the UI in Firebase Console, or use the `https://fcm.googleapis.com/fcm/send` API. See the [testing docs section in Firebase plugin]("https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/docs/MESSAGING.md#testing").
62+
To test with real messages, you can use the UI in Firebase Console, or use the `https://fcm.googleapis.com/fcm/send` API. See the [testing docs section in Firebase plugin](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/docs/MESSAGING.md#testing).
6363

6464
#### 6. Interactive Push Notifications - in push plugin they are set in the options argument passed to pushPlugin.register(options, callback) method. In Firebase plugin, it is done in a very similar way:
6565

@@ -81,7 +81,7 @@ model.onNotificationActionTakenCallback = () => {
8181
firebase.registerForInteractivePush(model: messaging.PushNotificationModel);
8282
```
8383

84-
Some lines in the above example have been omitted. See [Firebase plugin's interactive notifications docs]("https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/docs/MESSAGING.md#interactive-notifications-ios-only-for-now") for more details.
84+
Some lines in the above example have been omitted. See [Firebase plugin's interactive notifications docs](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/docs/MESSAGING.md#interactive-notifications-ios-only-for-now) for more details.
8585
8686
#### 7. areNotificationsEnabled() API
8787
In Firebase plugin it is pretty similar to the one in push-plugin, and even simpler to use:
@@ -91,4 +91,4 @@ import * as firebase from "nativescript-plugin-firebase";
9191
9292
const areTheyEnabled = firebase.areNotificationsEnabled(); // synchronous, retruns boolean;
9393
```
94-
This API is also supported in Android, SDK version 24 and above
94+
This API is also supported in Android, SDK version 24 and above

0 commit comments

Comments
 (0)