You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 7, 2019. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+11-4Lines changed: 11 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@ The code for the Push Plugin for NativeScript.
5
5
-[Getting started](#getting-started)
6
6
-[API Reference](#api)
7
7
-[Troubleshooting](#troubleshooting)
8
+
-[Using with Telerik Backend Services](#using-with-telerik-backend-services)
8
9
9
10
10
11
## Getting started
@@ -15,7 +16,7 @@ The code for the Push Plugin for NativeScript.
15
16
16
17
or use an existing one.
17
18
18
-
- Add the Push Plugin (from NPM). This will install the push plugin in node_module, in the root of the project. When adding a new platform (or using an existing one) the plugin will be added there as well.
19
+
- Add the Push Plugin (from NPM). This will install the push plugin in node_module, in the root of the project. When adding a new platform (or using an existing one) the plugin will be added there as well. Go to the application folder and add the push plugin:
19
20
20
21
tns plugin add nativescript-push-notifications
21
22
@@ -30,12 +31,12 @@ The code for the Push Plugin for NativeScript.
- Add sample code in app/main-view-model.js in the function HelloWorldModel() like this one to subscribe and receive messages (Enter your google project id in the options of the register method):
34
+
- Add sample code in app/main-view-model.js in the function HelloWorldModel() like this one to subscribe and receive messages (Enter your google project number in the options of the register method):
34
35
35
36
```javascript
36
37
var pushPlugin =require("nativescript-push-notifications");
37
38
varself=this;
38
-
pushPlugin.register({ senderID:'your-google-project-id' }, function (data){
39
+
pushPlugin.register({ senderID:'<ENTER_YOUR_PROJECT_NUMBER>' }, function (data){
39
40
self.set("message", ""+JSON.stringify(data));
40
41
}, function() { });
41
42
@@ -127,7 +128,7 @@ The code for the Push Plugin for NativeScript.
127
128
128
129
var settings = {
129
130
// Android settings
130
-
senderID:GOOGLE_PROJECT_ID, // Android: Required setting with the sender/project id
131
+
senderID:'<ENTER_YOUR_PROJECT_NUMBER>', // Android: Required setting with the sender/project number
131
132
notificationCallbackAndroid:function(message) { // Android: Callback to invoke when a new push is received.
132
133
alert(JSON.stringify(message));
133
134
},
@@ -311,3 +312,9 @@ In case the application doesn't work as expected. Here are some things you can v
311
312
### iOS
312
313
313
314
- Error "Error registering: no valid 'aps-environment' entitlement string found for application" - this means that the certificates are not correctly set in the xcodeproject. Open the xcodeproject, fix them and you can even run the application from xcode to verify it's setup correctly. The bundle identifier in xcode should be the same as the "id" in the package.json file in the root of the project.
315
+
316
+
## Using with Telerik Backend Services
317
+
318
+
In order to use the plugin with Telerik Backend Services take a look at the official sample:
0 commit comments