Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Feature request: Ability to set "title" (child property of "alert") in payload #14

Description

@rbottarelli

The "alert" key of the payload can be a dictionary with properties defined in table 5-2 in the Apple docs:

https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/TheNotificationPayload.html#//apple_ref/doc/uid/TP40008194-CH107-SW4

Among the properties are "title" and "body" but currently only "body" is supported by php-apn.

title (string): A short string describing the purpose of the notification. Apple Watch displays this string as part of the notification interface. This string is displayed only briefly and should be crafted so that it can be understood quickly. This key was added in iOS 8.2.

body (string): The text of the alert message.

I suggest updating the function apn_payload_set_array to support "title" and adding a new function apn_payload_set_title to set it individually.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions