petrpavlik / PusherNotificationsSwift

Wrapper around Pusher's push notification API intended for server-side swift applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

Build Status Latest Release Platforms Package Managers

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

About

Wrapper around Pusher's push notification API intended for server-side swift applications.

License:MIT License


Languages

Language:Swift 100.0%