APNs not returning success status

720 views
Skip to first unread message

Koenigsberg, Aryeh

unread,
Dec 27, 2011, 9:44:20 AM12/27/11
to java-apn...@googlegroups.com
Apple's APNs documentation states that they only
report status of a particular message if it was
rejected. For non-rejected messages, they do not
report anything.

My package which uses java-apns needs to reply to
its caller (the component which contacted me asking
to push a message to APNs) with a status from this
push request -- whether success or failure -- but
this is difficult to do under these circumstances.

For example, when I send to an invalid token, my
delegate on messageSent is called (inside which I
ought to be able to report successfully received
by APNs), but then, a second later, so is my
delegate on connectionClosed (inside which I
report a failed send).

How, then, can we know for certain that a message
was accepted for sending by APNs, and that it
is not going to be rejected a second later? Unless
we'd need to delay reporting status in messageSent
until we see that no connectionClosed was called.
Huh? That sounds complicated!

Any help on this is greatly appreciated!

--aryeh

Reply all
Reply to author
Forward
0 new messages