Swiftpack.co - Package - vapor-community/onesignal

OneSignal

Using OneSignal on Vapor.

For sending to an array of device tokens:

let deviceTokens = ["foo...", "bar..."]
let message = OneSignalMessage("Hello Vapor!")
let notif = OneSignalNotification(message: message, iosDeviceTokens: [deviceTokens])
let app = OneSignalApp(apiKey: Environment.get("ONESIGNAL_API_KEY") ?? "", appId: Environment.get("ONESIGNAL_APP_ID") ?? "")
let result = try OneSignal.makeService(for: request).send(notification: notif, toApp: app)

Github

link
Stars: 12

Dependencies

Used By

Total: 0

Releases

Fixes - 2020-02-24 22:02:48

Reverts the Async HTTP stuff - 2020-02-24 20:16:51

Segments Support - 2019-09-23 00:56:39

Adds support for segments

Async HTTP Support - 2019-09-12 17:47:00

Custom Data - 2019-01-19 19:42:44

Added support for custom data in notifications Added support for delayed notifications Added support for attachments

Fixed an issue with the category not working Fixed an issue where the sound was not specified correctly

Added some basic documentation and explanations to each variable

iOS Device Token Support - 2018-10-19 05:38:19

Notification Sending Works - 2018-10-01 05:56:46

Swift 4.2 Support - 2018-09-08 22:52:52

Other public initializer fixes - 2018-09-06 17:56:32

Typo Fixes and Renames - 2018-09-06 17:49:31

1.0.0 Alpha Release - 2018-09-06 17:34:15