I am sending notification from the server using websocketclient chrome extension.
When app is in foreground it works fine and below method is get executed.
- (void)webSocket:(SRWebSocket *)webSocket didReceiveMessage:(id)message { self.messagesTextView.text = [NSString stringWithFormat:@"%@\n%@", self.messagesTextView.text, message]; }
But when app is in background this method is not getting called. when apps comes background to foreground didReceiveMessage function get triggered.
The question is how to make sure didReceiveMessage function get trggred when app is in background?