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
Copy file name to clipboardExpand all lines: README.md
+52-60Lines changed: 52 additions & 60 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ PushSharp v4.0
3
3
4
4
PushSharp is a server-side library for sending Push Notifications to iOS/OSX (APNS), Android/Chrome (GCM), Windows/Windows Phone, Amazon (ADM) and Blackberry devices!
5
5
6
-
PushSharp v4.0+ is a complete rewrite of the original library, aimed at taking advantage of things like async/await, HttpClient, and generally a better infrastructure using lessons learned from the old code.
6
+
PushSharp v3.0+ is a complete rewrite of the original library, aimed at taking advantage of things like async/await, HttpClient, and generally a better infrastructure using lessons learned from the old code.
7
7
8
8
PushSharp will now follow [semver](http://semver.org/) versioning, so major version numbers will go up as there are any breaking api changes.
9
9
@@ -20,7 +20,7 @@ PushSharp will now follow [semver](http://semver.org/) versioning, so major vers
20
20
21
21
## Sample Usage
22
22
23
-
The API in v3.x series is quite different from 2.x. The goal is to simplify things and focus on the core functionality of the library, leaving things like constructing valid payloads up to the developer.
23
+
The API in v3.x+ series is quite different from 2.x. The goal is to simplify things and focus on the core functionality of the library, leaving things like constructing valid payloads up to the developer.
24
24
25
25
### APNS Sample Usage
26
26
Here is an example of how you would send an APNS notification:
@@ -30,43 +30,43 @@ Here is an example of how you would send an APNS notification:
@@ -75,9 +75,14 @@ foreach (var deviceToken in MY_DEVICE_TOKENS) {
75
75
// Stop the broker, wait for it to finish
76
76
// This isn't done after every message, but after you're
77
77
// done with the broker
78
-
broker.Stop ();
78
+
apnsBroker.Stop ();
79
79
```
80
80
81
+
#### Apple Notification Payload
82
+
83
+
More information about the payload sent in the ApnsNotification object can be found [here](https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/TheNotificationPayload.html).
84
+
85
+
81
86
#### Apple APNS Feedback Service
82
87
83
88
For APNS you will also need to occasionally check with the feedback service to see if there are any expired device tokens you should no longer send notifications to. Here's an example of how you would do that:
@@ -106,70 +111,71 @@ Here is how you would send a GCM Notification:
@@ -180,9 +186,14 @@ foreach (var regId in MY_REGISTRATION_IDS) {
180
186
// Stop the broker, wait for it to finish
181
187
// This isn't done after every message, but after you're
182
188
// done with the broker
183
-
broker.Stop ();
189
+
gcmBroker.Stop ();
184
190
```
185
191
192
+
#### Components of a GCM Notification
193
+
194
+
GCM notifications are much more customizable than Apple Push Notifications. More information about the messaging concepts and options can be found [here](https://developers.google.com/cloud-messaging/concept-options#components-of-a-message).
195
+
196
+
186
197
### WNS Sample Usage
187
198
188
199
Here's how to send WNS Notifications:
@@ -192,55 +203,36 @@ Here's how to send WNS Notifications:
0 commit comments