Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best practice to handle apple push notification when multiple users uses the same device

My app is user specific. multiple users can uses the same device.My application has offline logout functionality. consider that one of my user (say user 1)logout offline.during that time my server send notification to the APNS for user1. after some time my device become online. during that time i am not logged in to the app. my question is that while my device is online(when network connection is available)and user1 is logged out will my app receive the push notification from APNS server(those sent for logged out user)

like image 236
Mary Avatar asked Sep 11 '13 12:09

Mary


People also ask

What are the limitations of push notifications?

A basic notification includes a title, some text, an icon, and a link. A title can contain up to 65 characters, a description is generally limited to 240 characters.

Are Apple push notifications guaranteed?

The system makes every attempt to deliver local and remote notifications in a timely manner, but delivery isn't guaranteed. The PushKit framework offers a more timely delivery mechanism for specific types of notifications, such as those VoIP and watchOS complications use.

Can you have multiple Apple Push certificates?

Use a separate push certificate for each customer. This enables independent management of each customer's certificate and prevents customers from being able to see each other's device tokens.


1 Answers

On logout: [[UIApplication sharedApplication] unregisterForRemoteNotifications];

On login:

[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
        (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
like image 128
thatzprem Avatar answered Oct 11 '22 10:10

thatzprem