为什么 Parse push.setQuery 在 Swift 上不起作用?
Why Parse push.setQuery not working on Swift?
我正在尝试在其他用户点击 "favorite" 按钮时向 post 的所有者发送通知,但我收到错误消息:
Can't set both the query and channel (s) properties.
它可以是什么?我当前的代码:
let query = PFInstallation.query()
if let query = query {
query.whereKey("installationUser", equalTo: self.job!["owner"]! as! String)
let push = PFPush()
push.setChannel("Global")
push.setMessage("Some cool text here")
push.setQuery(query)
push.sendPushInBackground()
}
每当我执行行 push.setQuery(query)
时应用程序崩溃
删除行 push.setChannel("Global")
我正在尝试在其他用户点击 "favorite" 按钮时向 post 的所有者发送通知,但我收到错误消息:
Can't set both the query and channel (s) properties.
它可以是什么?我当前的代码:
let query = PFInstallation.query()
if let query = query {
query.whereKey("installationUser", equalTo: self.job!["owner"]! as! String)
let push = PFPush()
push.setChannel("Global")
push.setMessage("Some cool text here")
push.setQuery(query)
push.sendPushInBackground()
}
每当我执行行 push.setQuery(query)
删除行 push.setChannel("Global")