Skip to content

Releases: vapor/apns

Fix APNSwiftConnection.isClosed

19 Jan 05:42
82912b2
Compare
Choose a tag to compare
Pre-release

APNSwiftConnection.isClosed now correctly returns false if the channel is still active. Fixes #11.

Make Application.APNS an APNSwiftClient

09 Jan 21:34
afc9987
Compare
Choose a tag to compare
Pre-release

In addition to req.apns, app.apns can now be used to send push notifications.

APNS 1.0.0 Beta 2.2

11 Dec 02:49
cec35a4
Compare
Choose a tag to compare
APNS 1.0.0 Beta 2.2 Pre-release
Pre-release
  • app.apns.configuration is now a settable property (#6)

This allows for configuration to be accessed or modified by other code after it is set.

app.apns.configuration = try .init(keyIdentifier: ..., ...)
// later
print(app.apns.configuration?.teamIdentifier)
  • Updated to latest Vapor 4.0.0 beta (#6)

APNS 1.0.0 Beta 2.1

09 Dec 22:29
Compare
Choose a tag to compare
APNS 1.0.0 Beta 2.1 Pre-release
Pre-release

This package provides an easy to use API for sending push notifications to Apple's APNS powered by APNSwift.

Use app.apns to configure your application:

import APNS

try app.apns.configure(.init(
    keyIdentifier: "...",
    teamIdentifier: "...",
    signer: .init(file: ...),
    topic: "codes.vapor.example",
    environment: .sandbox
))

Then use the req.apns to send pushes from a route handler:

app.get("send-push") { req -> EventLoopFuture<HTTPStatus> in
    req.apns.send(
        .init(title: "Hello", subtitle: "This is a test from vapor/apns"),
        to: "..."
    ).map { .ok }
}