[aerogear-dev] APNS/UPS: With iOS 8.0 the 'alert' no longer just a string
Sebastien Blanc
scm.blanc at gmail.com
Wed Jun 3 02:52:35 EDT 2015
On Wed, Jun 3, 2015 at 8:37 AM, Corinne Krych <corinnekrych at gmail.com>
wrote:
> Is there an option to move this payload from under alert to a dedicated
> "ios" section as we have the "windows" one explained in UPS guide [1]?
> With this option Cordova will still have to deal with extended ios
> features for alert and we will have a new payload version.
>
We have already an APNs section in our message format ;) [1] , "alert" is
not part of it since we use it for the other platforms as well.
However, even moving it there won't change anything since we are speaking
here about the payload the push network sent to the device not about our
UnifiedPush Message Format.
[1]
https://github.com/aerogear/aerogear-unifiedpush-java-client/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/message/UnifiedMessage.java#L518
>
> Out of all options, I think a Cordova support need to be done anyway.
>
+1
>
> ++
> Corinne
> [1] https://aerogear.org/docs/unifiedpush/push-message-format-dev/
>
> On 2 June 2015 at 18:09, Matthias Wessendorf <matzew at apache.org> wrote:
>
>> Hi,
>>
>> since iOS 8.0 we have the option for UI actions on the push notification:
>>
>> http://cdn.iphonehacks.com/wp-content/uploads/2014/06/lock-screen-notifications.jpg
>>
>> 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
>> provided.
>> 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
>> iOS 8.0
>>
>>
>> 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?
>>
>> Thanks,
>> Matthias
>>
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>>
>> _______________________________________________
>> aerogear-dev mailing list
>> aerogear-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>
>
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20150603/28f36f0e/attachment.html
More information about the aerogear-dev
mailing list