Not getting push notifications with ADHoc certificates - ios

I am testing push notifications with production.pem with ADHoc provisioning certificates. From server side sending successfully but device is not getting notifications. Please help me
Thank you

The Server will show success means the problem is at your side, Check the below three scenarios for this
1.) The gateway should be gateway.push.apple.com:2195
2.) You have refreshed your provisioning profile after creating APNS certificate
3.)Your Device Token is correct corresponding to the Distribution Provisioning profile
N.B If all the above things are correct,then make sure your app is in background, If your App is in foreground, then you will receive push notification, but wont be able to see it

Keep in mind that the Ad hoc testing of push notifications only works if the app was installed on a device without using xcode+usb cable to install the app on the device. The app has to be delivered to the phone with either TestFlight (or similar) or something else like diawi.com

You can check in server side.
List<PushedNotification> notifications = Push.alert("TEST TEST",keystorePath,"test", ***true***, devices); => For Distribution
For development => List<PushedNotification> notifications = Push.alert("TEST TEST",keystorePath,"test", ***False***, devices)

Check your device token. There are two device tokens. First one is when you run app with development other one is run app with production. These are difference. Use Ad-hoc device token.

Related

Not receiving push notifications when enterprise app is in production

I have created an application on an enterprise account, since it's just going to be used by the employees in the company,
I have made the provisioning profiles and the certificates, while the app is still in development, I can receive push notifications normally, sandbox = 1, but when we added the app to the website, push notifications are not been received, knowing that the sandbox turned to 0.
Any idea what could be wrong?
Thank you
make sure that the certificate that you are using to send the notifications is attached to a "Distribution Provisioning Profile" and not "Development Provisioning Profile".
Got to iTunes Connect > Identifiers > App IDs, and make sure that your App ID Push Notifications are configured for Distribution. AND you are using the matching certificate when sending the notifications.

Quickblox sending push notifications to development devices, but not to production devices on iOS

I've been working on an app for a while that uses push notifications from the chat module of QuickBlox.
I've been testing the push notifications on my iPad and it works fine (Developer Device). I've added both of the certificates to QuickBlox and both are active(Developer & Production).
The production devices are being registered for remote notifications and they are showing that they registered for production push notifications. When I send a message to a developer device it receives the notification and it works fine, however when I send to a production device its not received.
If I try to send a push notification to production users from the admin panel it gets sent, but non receive it. The production users are internal and external testers in TestFlight. I heard the TestFlight testers have to use a production certificate so thats why I'm registering them as so. When I archive the build going to the store I make sure that I do it using the production provisioning profile. I don't know what else to do :O
Thanks in advance
edit: I tried using push notification tester for the certificate and it worked fine. It pushed and the push notification was received to the production device. Still not working on QuickBlox
I tried to remove the certificate and then add it again, but that didn't help. I had to revoke my certificate then create a new one. After I added it, it took a good few hours until the notifications started to work. Must have been an issue with QuickBlox.

will push notifications with Production-SSL certificate work when I'm still testing my app? How can I know it will work?

My push notifications are working fine with the sandbox model. I just verified that the production ssl certificate is working both with direct SSL-connection and with AWS SNS. However, my device is still producing the same push token as it produced for the sandbox, and this token is not working for production-level push notifications (rejected as invalid token by Apple server). Is it supposed to work? How can I make sure push notifications are working/will work for users who download the app from the app store?
Create a provisioning profile for "Ad Hoc" distribution, using your production certificate. Sign your app with that and install. Make sure your SSL connection to APNS knows which certificate to use, depending on whether client is production or dev.

Apple push notifications only working on one device

I have push notifications working on my main development device... but it is not working for my test device (using the same application). Does the test device also need to be set up as a development device? The app works.. it just does not populate the device token up to the server. I need to be able to send the app to testers and have push notifications work for everyone.
Beware that an app built with a development provision profile, must be notified trough the sandbox-version of the PNS-service with a development push certificate. If your application is built with a distribution sertificate ( either ad hoc or App store), you must use the production PNS-service with a production push certificate.
Hope this helps:)

Can't get device token when distribution

When in development, it works well, I can push notification to device.
but when distribution I can't get notification.
After debug I found the reason is that my server didn't receive device token from app.
I'm sure I used the correct provisioning and enabled the apps for both development and production.
anybody knows what's the reason that app can't get device token?

Resources