Search code examples
iosapple-push-notificationsquickblox

Quickblox 'automatic push notifications for offline user' not working


I have following scenario. User A sends message to User B in foreground -- this is working Send push notification to User B, when app is in background, from 'Messages' console -- this is working

I want to send notification alert to User B when app is in background. I read that this is done automatically by quickblox, but is not happening for me.

I have followed instructions on this link

I am using 'Starter' account in development mode. Do we need account with ' server side history' for this functionality?

Edit 1: Clarification: I want to send 'automatic push notifications for offline user' and not notification from app. I am also sending 'save_to_history' flag as mentioned on the link.


Solution

  • Found the problem.

    We have to logout from the the chat when the app enters background. I think, this might be required to let server know that we are actually offline and it should send us push notification instead. (just a guess!!)

    I think logout thing was mentioned in documentation as well but I didn't know that it was so important.