On Mon, 12 Oct 2015 18:45:04 +0100 (WEST)
João Parreira <
jpar...@ibt.pt> wrote:
> Hi Andrey,
> We agree and we are working on a new server version of the Realtime
> Messaging service where the send method has a success/error callback.
> However we don't have an ETA at the moment.
>
> Meanwhile you can use the send route of the REST API. It will give a
> 201 status code if the message was successfully published and 401
> otherwise (note, this doesn't mean all subscribers got the message,
> only that the Realtime server received your send request and will in
> a best-effort way try to deliver all the required copies to the
> channel subscribers).
>
> To make your life easier we have written a simple example and pushed
> to GitHub:
>
https://github.com/JoaoCaixinha/RealtimeMessaging-iOS-sendREST
>
> The method that sends the message using an async POST can be found
> here:
>
https://github.com/JoaoCaixinha/RealtimeMessaging-iOS-sendREST/blob/master/Ortc-iOS-Send-Rest/ViewController.m#L71-L114
>
> Hope this helps.
>
> ----- Original Message -----
>
> | From:
biga...@gmail.com
> | To: "Realtime Framework" <
realtime-...@googlegroups.com>
> | Sent: Monday, October 12, 2015 1:44:22 PM
> | Subject: [Realtime Framework] [iOS SDK] "send message" method should
> | have a callback
>
> | Hello,
>
> | In iOS SDK, the "send message" method should have a callback
> | parameter, called when the message has been posted to server.
>
> | Long story short, the callback is required to send message when user
> | "minimizes" the application.
>
> | Detailed use case:
> | Assume that some application sends a message when user puts it to
> | background.
>
> | On iOS, when the application is moved to the background state, it is
> | completely paused, i.e. all threads are suspended and no code is
> | executed until the application is resumed (moved to the foreground
> | state).
>
> | To allow for some finalizing, iOS provides the "extended" state,
> when | the application isn't suspended in background for some period
> of | time ( documentation ). When finished, t he application *must*