简体   繁体   中英

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 )性能。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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