离线本地通知 (Swift) [英] Local Notification on offline (Swift)

查看:21
本文介绍了离线本地通知 (Swift)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我没有连接到 Internet 并且我在我的本地数据库中注册了一些信息时,我想在我的应用程序 (swift) 中接收本地通知.请问可以这样做吗?

I want to receive a local notification in my app (swift) when I'm not connected to Internet and I have some information registered in my Local Data base. Is it possible to do that please?

推荐答案

本地通知不需要互联网.关于来自苹果开发者网站的本地通知

Local Notification doesnot requires internet. About Local Notification from apple developer site

本地通知可让您在应用可能未运行时提醒用户.当您的应用程序在前台或后台运行时,您可以安排本地通知.安排通知后,系统负责在适当的时间向用户发送通知.系统无需运行您的应用即可发送通知.

Local notifications give you a way to alert the user at times when your app might not be running. You schedule local notifications at a time when your app is running either in the foreground or background. After scheduling a notification, the system takes on the responsibility of delivering the notification to the user at the appropriate time. Your app does not need to be running for the system to deliver the notification.

有关更多信息,请查看this关联.您还可以查看链接以获取教程.

For more info check this link. You can also check this link for tutorial.

这篇关于离线本地通知 (Swift)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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