简体   繁体   English

在不运行应用程序或不发送推送通知的情况下为iOS应用程序添加徽章?

[英]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.

相关问题 iOS Azure推送通知应用程序徽章 - iOS azure push notification application badge 重置或清除iOS应用徽章,而无需进行任何应用交互,例如打开应用或推送通知 - Reset or clear iOS app badge without any app interactions like open the app or push notification 是否可以在不通过iOS中的推送通知打开应用程序的情况下更新应用程序图标上的徽章编号? - Is it possible to update badge number on app icon without openining app on push notification in iOS? IOS 应用程序中未收到 Firebase 推送通知徽章计数 - Firebase push notification badge count is not being received in IOS app 如何在iOS应用程序上使用PushWoosh重置推送通知徽章计数器 - How to reset push notification badge counter with PushWoosh on an iOS app Phonegap 3.0及更高版本-是否有无需更新通知即可更新应用程序徽章的插件? - Phonegap 3.0 and newer - Is there a Plugin to Update the App Badge without a Push Notification? 在不显示推送通知的情况下增加应用徽章数量 - Increasing App badge count without showing push notification 推送通知-应用徽章图标 - Push Notification - App Badge Icon 使用推送通知IOS发送应用程序版本 - sending application version with Push Notification IOS Firebase通知未在iOS应用程序中显示警报或横幅和徽章应用程序图标 - Firebase notification not showing alert or banner and badge app icon in iOS Application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM