重启iOS后重新安排本地通知 [英] Local Notification rescheduling after reboot iOS

查看:84
本文介绍了重启iOS后重新安排本地通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的目标是重新启动后重新安排我的本地通知,因为它们在发送后会丢失.因此,我需要一些服务来监听设备关闭,然后重新安排所有本地通知.我在Android中找到了有关Broadcast Receiver的一些资料,但是找不到有关iOS的任何此类信息.

My goal is to reschedule my local notifications after reboot because they get lost after it. So I need some service that will listen for device swithing off and than will reschedule all local notifications. I found some material about Broadcast Receiver in Android, but I can't find any such information about iOS.

我将通知存储在数据库中.因此,当设备重新启动时-我需要阅读所有尚未触发的活动通知,并重新安排它们的时间.有什么办法吗?

I store my notifications in database. So when device is rebooted - I need to read all my active notification that hasn't been fired and reschedule them. Is there any way to do it?

我也正在使用Xamarin,但在这种情况下似乎仍然没有用.

Also I'm using Xamarin but it seems like it's not useful anyway in that case.

任何指向正确方法的人都会感激不尽.

Any pointing to the right way will be grateful.

推荐答案

对任何想知道此类问题的人的答案.iOS确实有自己的通知系统,该通知系统将通知存储在内存中.当设备重新启动时,它只会调用所有活动的通知,就像根本没有重新启动一样.因此,可以肯定的是,无需对此问题执行任何操作.

The answer to anyone who ever wondered about such question. iOS do have his own notification system that stores notifications in memory. And when device reboots it just invokes all active notifications as if there was no reboot at all. So for sure there is no need to implement anything on this problem.

这篇关于重启iOS后重新安排本地通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆