QuickBlox / q-municate-ios

Q-municate iOS repository
http://q-municate.com
MIT License
163 stars 86 forks source link

Push Notification not working when App is not running. #332

Closed kushal211 closed 6 years ago

kushal211 commented 6 years ago

Hello,

I've clone this repo. Change the account detail and uploaded the iOS push certificate in the admin panel.

When the app is not running or in the background, the push notification for the messages are not coming. I've tried sending push notification from the QB dashboard and it is working perfect but not for the messages.

I've tried with the audio and video call, the push is coming but the application is crashing in handlePushNotificationWithDelegate method in QMPushNotificationManager.m file as the payload does not have the dialogID.

I'm testing it with the sandbox and certificate is also uploaded same.

ghost commented 6 years ago

Hi @kushal211,

1) Please remove all certificates and create the new one. It should be Universal (Sandbox & Production & VoIP) SSL certificate.

2) Did you have any errors in "admin panel" -> Push notifications -> Queue?

3) Try checking certificate error logs also. image

3) Could you provide full logs with gist.github.com?

Thanks.

ghost commented 6 years ago

@kushal211 For enable full logs use code below:

[QBSettings setLogLevel:QBLogLevelDebug];
[QBSettings enableXMPPLogging];
kushal211 commented 6 years ago

Hi @pro100andrey ,

Thanks for the reply.

  1. Please remove all certificates and create the new one. It should be Universal (Sandbox & Production & VoIP) SSL certificate.

    • Yes, Certificate is created new and uploaded again as well.
  2. Did you have any errors in "admin panel" -> Push notifications -> Queue?

    • Messages are not even displayed in the Queue as well. (Check the attached image) screen shot 2018-04-03 at 2 13 23 pm
  3. Try checking certificate error logs also.

  4. Could you provide full logs with gist.github.com?

    • I did not get you here. Sorry. Which logs do you want?
ghost commented 6 years ago

@kushal211

Did you have any errors in "admin panel" -> Push notifications -> Queue?

Tap on the sent status and check again. Did you have any errors for Chatalerts.

I did not get you here. Sorry. Which logs do you want?

Could you provide your applicationID and bundle identifier?

Thanks!

kushal211 commented 6 years ago

Did you have any errors in "admin panel" -> Push notifications -> Queue?

All the five are with this status - APNS (Apple Push) Delivered: 1, failed: 0

applicationID: 69786 bundleID: com.indianic.securechatapp

ghost commented 6 years ago

@kushal211

I need more time to investigate.

Thanks.

kushal211 commented 6 years ago

Hi @pro100andrey ,

It is started working. I actually don't know how but the last change which I made in admin panel was to re-enable Enable automatic notifications for offline users from the Chat > Alerts.

I've first disabled it and then enable it again. And the push notification has started working fine.

Thank you for the support.