edamov / pushok

PHP client for Apple Push Notification Service (APNs) - Send push notifications to iOS using the new APNs HTTP/2 protocol with token-based (JWT with p8 private key)
MIT License
368 stars 119 forks source link

Add Support For Critical Notification Sound #116

Closed lucadegasperi closed 3 years ago

lucadegasperi commented 3 years ago

This PR adds support for sending critical notifications (assuming you have the right entitlements from Apple).

The sound attribute on the Payload object now accepts both a string or a Sound object as the payload.

Some validation rules for critical (0, 1) or volume (from 0.0 to 1.0) haven't been implemented but this is a good start and works already in production for me.

coveralls commented 3 years ago

Coverage Status

Coverage increased (+1.04%) to 82.834% when pulling dd216b05c82fd3ed3424a5129821e4cd128e9138 on lucadegasperi:master into b69afbc6f5a79902d3eb819352a9a2c6e83ee976 on edamov:master.

edamov commented 3 years ago

Great. Thanks!