AppsDev
AppsDev

Reputation: 12499

iOS APNS and device token good practices

I'm making use of push notifications in my iOS app, and it is an app which requires users to log in to access, so of course there is a logout function as well. I'd like to know if it is a good practice, or if it is the common thing to do, to "clear" the device token sent to your provider when a user logs out (I mean, to send an empty string as the device token).

Thanks in advance

Upvotes: 1

Views: 1088

Answers (1)

Muhammad Adnan
Muhammad Adnan

Reputation: 2668

1) Send empty String to Provider and keep device token saved locally to access on Login.

OR

2) Your logout service should set flag against current user and device token to disable pushnotifications and enable on login again.

Upvotes: 3

Related Questions