简体   繁体   English

在特定时间间隔内禁用推送通知iOS

[英]Disable push notification for specific time interval iOS

Is it possible to disable (not getting/Showing) the push notification via app. 是否可以通过应用程序禁用(不获取/显示)推送通知。 I know that, we can register or unregister for push notifications at any time, but in my application user can choose specific time-range in which he wants to get the notification. 我知道,我们可以随时注册或取消注册推送通知,但是在我的应用程序中,用户可以选择要获取通知的特定时间范围。

For example: If user chooses time-range 5-6 PM , then app should only show the notifications between 5-6 PM, and should not show/receive/reject notification if they sent out side of the time range time<5 and time>6 例如:如果用户选择time-range 5-6 PM ,则应用程序应仅在5-6 PM之间显示通知,并且如果他们在时间范围time<5 and time>6发送,则不应显示/接收/拒绝通知time<5 and time>6

Is it possible? 可能吗? Is there any workaround with silent-notifications ? silent-notifications有解决方法吗? Something like, I receive notification and can turn it into silent-notification by modifying payload via app, by using notificaiton-service-extention? 像这样,我会收到通知,并且可以通过使用notificaiton-service-extension通过应用程序修改有效负载来将其转变为静默通知?

Please help! 请帮忙!

You can set user time preference at your backend(Server-side), so the server send the notification to user in prefer time only. 您可以在后端(服务器端)设置用户时间首选项,因此服务器仅在首选时间将通知发送给用户。

Silent notification is not meet to your requirement. 静默通知不符合您的要求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM