PusherNotificationsSwift
Wrapper around Pusher's push notification API intended for server-side swift applications.
Pusher currently provides free unlimited notifications for both iOS and Android, which probably makes it together with this SDK the simplest way to start sending push notifications using your server-side swift backend.
Check out Pusher’s official documentation and the usage example bellow to get started.
Basic Usage
let pusher = Pusher(appKey: "a", appSecret: "b", appId: "c")
do {
try pusher.notify(interests: ["donuts"], apns: ["aps": ["alert": ["body": "hello world"]]])
} catch {
// ...
}
Installation
Swift Package Manager
Add PusherNotificationsSwift
to your dependencies in Package.swift
.Package(url: "https://github.com/petrpavlik/PusherNotificationsSwift.git", majorVersion: 0),
License
MIT
Author
Petr Pavlik - @ptrpavlik