简体   繁体   English

如何从今天的扩展中设置 iOS 应用的徽章计数?

[英]How can I set badge count of iOS app from its today extension?

I'm looking for a way to update the badge count of iOS app icon from its iOS8 today extension.我正在寻找一种方法来从其 iOS8 today 扩展更新 iOS 应用程序图标的徽章计数。 Today extension has a button and by touching that button, user can increase or decrease badge count of iOS app.今天扩展有一个按钮,通过触摸该按钮,用户可以增加或减少 iOS 应用程序的徽章计数。 Can anyone help me with this?谁能帮我这个?

PS: I need to update the badge count without reopening the app even when the app is terminated. PS:即使应用程序终止,我也需要在不重新打开应用程序的情况下更新徽章计数。

由于您已经创建了组,您可以在组文件夹中保留一个文件并在扩展名中添加一个文件观察器,从应用程序更新文件,文件观察器将捕获更改,您的工作就完成了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从应用程序中删除ios今天的扩展 - How to remove ios today extension from app 如何从通知服务扩展访问应用程序的徽章计数 - How access app's badge count from Notification Service Extension 我可以使用基本SDK iOS 7.0和Today Extension发布应用程序吗? - Can I release an app with base SDK iOS 7.0 and with Today Extension? 如何在iOS 10中设置徽章计数以进行推送通知? - How to set badge count in iOS 10 for pushnotification? iOs - 如何使用url将数据从Widget(今日扩展)传递到App? - iOs - How to pass data from Widget (Today Extension) to App with url? 在Swift中,如何将永久变量从主iOS应用传递到扩展程序(例如,今天的扩展程序,自定义键盘) - In Swift, how would I pass a permanent variable from the main iOS app to an extension (e.g. today extension, custom keyboard) 徽章计数未显示在 iOS 应用程序中 - Badge Count is not shown in iOS App 如果可以从“今天”小部件设置徽章编号 - If is possible to set badge number from “today” widget 如何从包含的应用程序更新我的iOS Today小部件? - How can I update my iOS Today widget from the containing app? 如何从其应用程序扩展启动父 iOS 应用程序 - How to launch a parent iOS App from its App Extension
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM