how do I disregard push notifications

↘锁芯ラ 提交于 2019-12-11 09:35:55

问题


I have a settings in my app to be able to turn on/off push notifications, this is stored in NSUserDefaults. Now the way I understand it is that we'll always get push notifications if we subscribe to a channel. However, if a user turns this settings to off this doesn't necessarily he/she wants to unsubscribe for it, but maybe turn it off temporarily. How do I then disregard the push notifications without actually unsubscribing to the channel?


回答1:


This can be handled in the back end side ... when the user turn off the push notification send his device token to your server (through api function) then when you send a notification you will ignore all the device's token who choose to turn off the notification service.



来源:https://stackoverflow.com/questions/9968628/how-do-i-disregard-push-notifications

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!