Parse platform iOS上的多个通知
应用程序为每个新项目发送多个通知,我如何只能获得一个通知?Parse platform iOS上的多个通知,parse-platform,Parse Platform,应用程序为每个新项目发送多个通知,我如何只能获得一个通知? 当您当时设置通知时,您必须保存UserInfo以识别特定通知 Swift 2.0: let dict:NSDictionary = ["ID" : notifiUserInfoId] localNotification.userInfo = dict as! [String : String] 在上面的代码中,您必须为“ID”键设置特定的值。要获得一个,请使用以下代码 Swift 2.0: var arrNot
当您当时设置通知时,您必须保存UserInfo以识别特定通知 Swift 2.0:
let dict:NSDictionary = ["ID" : notifiUserInfoId]
localNotification.userInfo = dict as! [String : String]
在上面的代码中,您必须为“ID”键设置特定的值。要获得一个,请使用以下代码
Swift 2.0:
var arrNotification = NSArray()
arrNotification = UIApplication.sharedApplication().scheduledLocalNotifications!
for notify in arrNotification
{
let notification = notify as! UILocalNotification
if let info = notification.userInfo as? [String: String]
{
if info["ID"] == lblCurrentOpenEventIdOnDay.text
{
//get your notification here
}
}
}
}
希望这对你有帮助 询问应用程序的供应商。我们不提供应用程序支持。感谢您提供的信息!但是我用它来自动通知:有什么方法吗?