android-troubleshooting

Push Notification Troubleshooting Guide

These are common checkpoints to troubleshoot your push-notification issue.

1.Checkout your Push Notification Capability

 As a first step you can check if your bundleId is enabled for receiving push notification. You can check this easily by verifying capability of your project sections. This will ensure that your current bundleId is enabled to receive remote push notifications. And entitlement is also enabled for it.
notification_capability_enable

2.Device Token generated on device.

As a second checkpoint you need to check if apns device-token is generated by device. You will get notification token in didRegisterForRemoteNotificationsWithDeviceToken.  

– (void)application:(UIApplication *)application

didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {

}

 

NOTE: In case of error you will get callback in below method. In case of any exceptions you can put some logs and check.

(void) application:(UIApplication*)application
didFailToRegisterForRemoteNotificationsWithError:(NSError *)error {

}

In case if you get this error:

20120611 12:45:23.762 MyApplication[13332:707] Failed to get token, error: Error Domain=NSCocoaErrorDomain Code=3000 “no valid ‘aps-environment’ entitlement string found for application” UserInfo=0x24a3b0 {NSLocalizedDescription=no valid ‘aps-environment’ entitlement string found for application}

then check two possible cases

  1. a) entitlements file should be present in project and it’s path is correct
  2. b) ANY SDK case (http://stackoverflow.com/questions/40379718/xcode-8-1-entitlements-error-after-adding-entitlements-file/40380095#40380095)

3.APNS Certificate is Valid:  

This is most important part to validate. Any application server only able to send notification if your APNS certificate is according to bundleId used. You can check in your apple developer account, if you have downloaded the correct certificate.
notification_cert_downloads

Once you get the (device token in step2)  you can check certificate by using any third party tool like APN Tester or Houston .

Once you are confirm your certificate is correct. You can check below step.

For, how to generate .p12 files, you can follow below blog:

Get your apple push SSL certificate

4. Validating Xcode Project Settings – correct signing certificate .

You need to make sure you are using correct signing certificate and corresponding provisioning profile are correct in your xcode build settings.

notification_remote_notification_enabled

Make sure you are setting correct flag in Applozic setting according to your signing certificate.

https://www.applozic.com/docs/ios-chat-sdk.html#f-apns-certification-type-setup-

Time for On Demand Services to embrace Real Time Chat
Message Broadcasting – Cheaper and more effective alternative to SMS