since iOS 8.0 we have the option for UI actions on the push notification:
This is supported on java-apns and therefore on the UPS, however this
causes the alert to be an object, and not a String, if the 'action' is
Another feature that is leveraging this is the support for Safari, there is
a 'title' on the alert object, used by Apple Watch (iOS 8.3) as well.
Sending always an object from the UPS to the APNs cloud breaks the Cordova
code, since it's expecting a string.
On the UPS I could do construct the object only if things like title or
action are actually set. This would fix the issue on Cordova. However, this
means that our Cordova code would not support the 'action', introduced in
I can see a few options:
* for 1.1.0 -> do if/else and send object only if present. However, this
would still mean the Cordova plugin has to check if the alert is just a
string, to avoid crahes
* for 1.2.0 (or 1.1.x, if really needed) -> Add Cordova support for alert
being an object (helps for Apple Watch apps and supports the 'action')
Any thoughts or other options?