Em 28 de fev de 2017, à(s) 09:14, Pino Playzs <rlup...@outlook.com> escreveu:Hi,
I have setup ParseLiveQuery for my app by following the instructions in this link http://docs.back4app.com/docs/ios/live-query-with-objective-c/.
However, when I run my app, I get repeated error messages in the console like "nw_connection_get_connected_socket_block_invoke 1336 Connection has no connected handler". This happens when running on both the simulator and physical devices and I am not getting any response from the LiveQuery server.
Through debugging I found that it is the call to [self.liveQueryClient subscribeToQuery:self.msgQuery] which triggers these error messages.
Is anyone else having this problem and is this the reason why my client is not receiving any live updates from the server?
Thanks.
--
You received this message because you are subscribed to the Google Groups "back{4}app" group.
To unsubscribe from this group and stop receiving emails from it, send an email to back4app+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/back4app/5049e842-2ed7-4484-80c2-c9d7f209599a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks for the reply Alysson. I no longer receive those error message however LiveQuery is still not working for me.
@interface MessageHandler : NSObject <PFLiveQuerySubscriptionHandling>
@end
@implementation MessageHandler
- (void)liveQuery:(PFQuery *)query didRecieveEvent:(PFLiveQueryEvent *)event inClient:(PFLiveQueryClient *) client {
NSLog(@"EVENT TYPE: %ld", (long)event.type);
NSLog(@"EVENT OBJECT: %@", event.object);
}
-(void)liveQuery:(PFQuery<PFObject *> *)query didEncounterError:(NSError *)error inClient:(PFLiveQueryClient *)client {
NSLog(@"ERROR: %@", error);
}
-(void)liveQuery:(PFQuery<PFObject *> *)query didSubscribeInClient:(PFLiveQueryClient *)client {
NSLog(@"SUBSCRIBED: %@",query);
}
@end
@property (nonatomic, strong) PFLiveQueryClient *liveQueryClient;
@property (nonatomic, strong) PFQuery *msgQuery;
@property (nonatomic, strong) PFLiveQuerySubscription *subscription;
@property (nonatomic, strong) MessageHandler *myHandler;
@end
PFQuery *q = [PFQuery queryWithClassName:<some class>];
[q whereKey:<key 1> equalTo:<some value>];
[q includeKey:<key 2>];
self.msgQuery = q;
self.myHandler = [[MessageHandler alloc] init];
self.subscription = (PFLiveQuerySubscription *)[self.liveQueryClient subscribeToQuery:self.msgQuery withHandler:self.myHandler];
Thanks
--
You received this message because you are subscribed to a topic in the Google Groups "back{4}app" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/back4app/f8Kt4_tz2e4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to back4app+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/back4app/e63397f3-c77d-4068-8e50-5f35cb1a76fe%40googlegroups.com.