immobiliare / ApnsPHP

ApnsPHP: Apple Push Notification & Feedback Provider
BSD 3-Clause "New" or "Revised" License
1.44k stars 452 forks source link

Support Safari push notification #111

Open jonas0616 opened 8 years ago

jonas0616 commented 8 years ago

Safari push notification is basically based on APNS. The only difference is the format of JSON dictionary of notification body:

{
    "aps": {
        "alert": {
            "title": "Flight A998 Now Boarding",
            "body": "Boarding has begun for Flight A998.",
            "action": "View"
        },
        "url-args": ["boarding", "A998"]
    }
}

However, the existing ApnsPHP does not allow non-string alert content. And it needs a method to add url-args.

delitestudio commented 8 years ago

@jonas0616 We have implemented a custom message that inherits from Message and handles the Safari payload. We have sent a pull request with this integration.