Skip to content

Commit

Permalink
Merge branch 'useBroadcastPath' of https://github.com/cbaker6/node-apn
Browse files Browse the repository at this point in the history
…into useBroadcastPath
  • Loading branch information
cbaker6 committed Jan 15, 2025
2 parents b6b1a6f + 9813ce8 commit 209794a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@ Create a Live Activity notification object and configure it with the relevant pa
```javascript
let note = new apn.Notification();

note.topic = "<your-app-bundle-id>.push-type.liveactivity";
note.expiry = Math.floor(Date.now() / 1000) + 3600; // Expires 1 hour from now.
note.pushType = "liveactivity",
note.badge = 3;
note.sound = "ping.aiff";
note.alert = "\uD83D\uDCE7 \u2709 You have a new message";
note.payload = {'messageFrom': 'John Appleseed'};
note.topic = "<your-app-bundle-id>";
note.pushType = "liveactivity",
note.relevanceScore = 75,
note.timestamp = Math.floor(Date.now() / 1000); // Current time
note.staleDate = Math.floor(Date.now() / 1000) + (8 * 3600); // Expires 8 hour from now.
Expand Down Expand Up @@ -259,12 +259,11 @@ let note = new apn.Notification();

note.channelId = "dHN0LXNyY2gtY2hubA=="; // Required
note.expiry = Math.floor(Date.now() / 1000) + 3600; // Expires 1 hour from now.
note.pushType = "liveactivity",
note.badge = 3;
note.sound = "ping.aiff";
note.alert = "\uD83D\uDCE7 \u2709 You have a new message";
note.payload = {'messageFrom': 'John Appleseed'};
note.topic = "<your-app-bundle-id>";
note.pushType = "liveactivity",
note.relevanceScore = 75,
note.timestamp = Math.floor(Date.now() / 1000); // Current time
note.staleDate = Math.floor(Date.now() / 1000) + (8 * 3600); // Expires 8 hour from now.
Expand Down
3 changes: 0 additions & 3 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -680,9 +680,6 @@ module.exports = function (dependencies) {
}
await this.closeAndDestroySession(this.session);
await this.closeAndDestroySession(this.manageChannelsSession);
if (this.config.createConnection) {
this.config.createConnection = null;
}

if (callback) {
callback();
Expand Down

0 comments on commit 209794a

Please sign in to comment.