我有一个带有 LiveQuery 的 Parse 服务器。
我可以通过 log info: 连接到实时查询Create new client: 1
,并且 websocket.org 确认连接,但是没有调用任何完成块。
这是完整的代码:
self.pfclient = [[PFLiveQueryClient alloc] init];
PFQuery* query = [PFQuery queryWithClassName:@"Reqs"];
[query whereKey:@"objectId" notEqualTo:@"asdfas"];
self.subscription = [self.pfclient subscribeToQuery:query];
[self.subscription addSubscribeHandler:^(PFQuery * _Nonnull query) {
NSLog(@"Subscribed");
}];
[self.subscription addUpdateHandler:^(PFQuery * _Nonnull query, PFObject * _Nonnull obj) {
NSLog(@"Update");
}];
[self.subscription addErrorHandler:^(PFQuery * _Nonnull query, NSError * _Nonnull error) {
NSLog(@"Error");
}];