Closed xhooch closed 5 years ago
I refactored a little the code, now ApnsConfig contains ApnsPayload (more intuitive). I now understood the problem: Firebase doc does not specify ApnsPayload implementation and Apple's documentation was a little confusing.
Will release a patch soon 👍
Ok, i added a ApsData in ApnsPayload to manage aps Apple's specific keywords, should be ok now. Do test and report back please!
Thanks. It's work.
https://github.com/plokko/firebase-php/blob/master/src/FCM/Message/ApnsConfig.php#L28 This will throw an exception (InvalidArgumentException)
The JSON dictionary object must contain an aps key, the value of which is a dictionary containing data used by the system to deliver the notification.
For example https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html#//apple_ref/doc/uid/TP40008194-CH10-SW1