let query = AVQuery(className: "PersonalLog")
query.whereKey("creator", equalTo: user)
query.findObjectsInBackground { (result, error) in
guard let arr = result else { return }
let a = arr as! [AVObject]
self.data = a.map({
$0.object(forKey: "name") as! String
})
self.logTableView.reloadData()
}
let liveQuery = AVLiveQuery(query: query)
liveQuery.delegate = self
liveQuery.subscribe { (result, error) in
debugPrint(result)
}
我创建了一个新的 PersonalLog
,但是没有执行 liveQuery(_ liveQuery: AVLiveQuery, objectDidCreate object: Any)
。
控制台已开启。