[英]Badge iOS application without running the app or sending a push notification?
I have a task manager app, and I want the app icon to show badges for the number of tasks due today. 我有一个任务管理器应用程序,并且我希望该应用程序图标显示今天到期的任务数量的徽章。 I know you can use
我知道你可以用
[UIApplication sharedApplication].applicationIconBadgeNumber=1;
to badge, but the user would have to open the app. 徽章,但用户必须打开该应用。 I know you can set it up so a notification is sent on a certain date, but all I want is the badge.
我知道您可以进行设置,以便在特定日期发送通知,但是我想要的只是徽章。 I don't want a notification with a message sent.
我不希望收到带有消息的通知。
UILocalNotification
可以被配置为只设置应用程序的徽章,如果你离开alertBody
作为nil
,只有在填写applicationIconBadgeNumber
(和fireDate
)性能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.