Skip to content

Commit dffd6d9

Browse files
committed
Updated readme with apns feedback service info
1 parent fcb051e commit dffd6d9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,23 @@ broker.Stop ();
7575

7676
Other platforms are structured the same way, although the configuration of each broker may vary.
7777

78+
### Apple APNS Feedback Service
79+
80+
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:
81+
82+
```csharp
83+
var config = new ApnsConfiguration (
84+
ApnsConfiguration.ApnsServerEnvironment.Sandbox,
85+
Settings.Instance.ApnsCertificateFile,
86+
Settings.Instance.ApnsCertificatePassword);
87+
88+
var fbs = new FeedbackService (config);
89+
fbs.FeedbackReceived += (string deviceToken, DateTime timestamp) => {
90+
// Remove the deviceToken from your database
91+
// timestamp is the time the token was reported as expired
92+
};
93+
fbs.Check ();
94+
```
7895

7996

8097
## How to Migrate from PushSharp 2.x to 3.x

0 commit comments

Comments
 (0)