我的While send push notification from one signal send link or path of activity .
1. Define deep links in manifest.
2. Open Launcher activity on click of Notification.
3. Check path in data accepted by activity using uri.getData()
4. On based on data navigate to your desired activity.
对象名为CoreData
,其中一个属性为Conversations
,类型为messages
。
我想要做的是创建一个与此等价的谓词:
[Message]
不幸的是,上面的代码实际上并不适用于conversationsFetchRequest.predicate = NSPredicate { object, dictionary in
if let messages = dictionary?["messages"] as? [Message] {
return messages.contains { !$0.triggeredNotification }
} else { return false }
}
。我试过了,我收到了一个关于不兼容的CoreData
的错误。我想字符串NSPredicate
看起来像这样:
NSPredicate
编辑:
我相信答案可能就是这些问题吗?
conversationsFetchRequest.predicate = NSPredicate(format: "messages CONTAINS message where triggeredNotification == false")
但是,这会导致运行时崩溃。