简体   繁体   English

Parse.com快速重置徽章用于推送通知

[英]Parse.com Swift Reset Badge for Push Notifications

I'm using the last version of the Parse Library and the last version of Xcode 6.3.2 The application receive Notifications just right and when the application became active it reset the badge locally but in the next Notification the badge just ignores the 0 value for the badge. 我使用的是解析库的最新版本和Xcode 6.3.2的最新版本,应用程序恰好接收到通知,当应用程序处于活动状态时,它将在本地重置标志,但在下一个通知中,标志仅忽略0值。徽章。

The code: 编码:

        if (currentInstallation.badge != 0) {
            self.reloadInfo = true
            currentInstallation.badge = 0
            currentInstallation.saveEventually()
        } else {
            self.reloadInfo = false
        } 

Does not work, neither 不起作用,也不

currentInstallation = PFInstallation.currentInstallation()
currentInstallation.badge = 0
currentInstallation.saveEventually()

Any ideas of what can be wrong ? 关于什么是错的任何想法?

Thanks in advance. 提前致谢。

It was just a mess with the provisioning profile, the Parse Installation database, it is just solved. 只是解决了配置文件,“解析安装”数据库的问题。

Thanks. 谢谢。

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

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