Slient push notification to open App

364 views Asked by At

I'm new to iOS platform so please bear with me.

We are developing an App which will enable user to perform in-app video chat, for video chat we are considering OpenTalk sdk.

So here is the scenario, User A starts a video chat session with user B, a request is sent to server for generating sessionId and token (which is passed to client), the server returns the sessionId and token to user A, now the problem arises how we will pass the same sessionId and token to user B, so that the video chat can be started.

We thought of using APN service to send a notification to user B along with sessionId and token in payload, but that would not be a good user experience, because it will appear in notification window, also if the user is offline then the notification will show up once he is online (of which I don't see any use).

Any help would be highly appreciated.

1

There are 1 answers

2
SierraMike On BEST ANSWER

iOS 7+ supports "Silent Push Notifications".

The aps dictionary can also contain the content-available property. The content-available property with a value of 1 lets the remote notification act as a “silent” notification. When a silent notification arrives, iOS wakes up your app in the background so that you can get new data from your server or do background information processing. Users aren’t told about the new or changed information that results from a silent notification, but they can find out about it the next time they open your app.

Source: https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html