You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How do we handle new event when the app enter background mode?
Here under is my approach for this, but it still doesn't work
Thank you very much for your suggestion
// on app delegate
- (void)applicationDidEnterBackground:(UIApplication *)application {
[self.sharedSocket on:kMESSAGEcallback:^(SIOParameterArray *args) {
NSLog(@"it does work in here too!");
}];
}
// on other controller
AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
[SIOSocket socketWithHost:kHOST_URLresponse:^(SIOSocket *socket) {
appDelegate.sharedSocket = socket;
self.mySocket = socket;
[self.mySocket on:kMESSAGEcallback:^(SIOParameterArray *args) {
NSLog(@"it works!");
}];
//other logic code
}];
The text was updated successfully, but these errors were encountered:
I'm having a similar issue with emits not working when the app goes in background mode. The log shows that the emit function has been called but the callback is not triggered and the log goes quiet. - Until I open the app again, that is. Then the log floods with error messages from siosocket with the error: "type = TransportError;".
How do we handle new event when the app enter background mode?
Here under is my approach for this, but it still doesn't work
Thank you very much for your suggestion
The text was updated successfully, but these errors were encountered: