I've followed the iOS getting started tutorial here, registered my device but the notifications don't seem to arrive. What am I doing wrong?
It would be helpful to:
Check the exact reason in the statistics page of that notification
Did you compile the app with the correct provision profile? In order to test with production certificate, you'll need to compile the app with AdHoc provision profile.
For easier debugging, please add our error delegation method as shown in our wiki here
Related
I have an IOS Xamarin project that uses firebase for push notifications. The push notifications are working on a debug build. I uploaded the project to Test Flight and push notification are not receiving anymore.
I have a development certificate and a production certificate. I am using an App Store provisioning profile. I have tried revoking and making new certs. I have added FirebaseAppDelegateProxyEnabled - Yes to the info plist. I am receiving firebase tokens in test flight.
Thanks
You must add as well the APNS/Certificate for Production on Firebase, it happens all the time. Check you have both of them.
Better still if you use the P8 Key. In this case you don't need any other certificates whatsoever. For Firebase is the best approach, comment if you need more help.
Cheers.
I have an issue with receiving notifications on Twilio Chat with Production APN Certifications, i get the error:
Error - 52131
Invalid APNs credentials
Possible Causes
Credential (certificate and private key) is invalid.
Certificate expired.
Possible Solutions
Make sure you have valid certificate and private key provided in your Credential.
When I test my sandbox APN certifcates the push notifications work perfectly.
However when I create APN PUSH SERVICES Certification and upload these and link them to my programmable chat function I get the error message: 52131 - Invalid APNs credentials... https://www.twilio.com/console/runtime/debugger/NOf2857a6c1db54e27984dd8fa9ff5100f
Just to clarify, the push notifications work perfectly on my development project. I use a Sandbox APN certificate, and selected the Sandbox tick box
However in the production version, where I am using:
Specific APN Apple Push Services Certificate, for a unique APP ID I
get the 52131 error.
I did not tick use for sending to Sandbox credential. As it is a
push credentiual
I followed all the instructions perfectly for exporting the
certificate keys.
I also use separate API Keys and a separate Programmable chat.
I get registration of bindings but no notifications as the
certificate is invalid, which I cannot see why as I checked by regenerating a certificate many times
I read in some responses to similar issues having the Sandbox and PUSH SERVICES APN certificate in the same App ID? Or not using the same CertificateSigningRequest to generate the Sandbox and PUSH? Why would this make a difference?
This was the thread: https://github.com/twilio/voice-quickstart-objc/issues/101
Finally after several weeks of emailing Twilio support I found the answer.
Basically the issue was probably because I extracted the Keys from my distribution certificate somehow and not the Push one. So make sure you are extracting the correct keys from the correct certification. Also because I was deleting and removing the push credentials from Twilio so often the bindings to my users were pointing to old Push Credentials that did not exist, so I removed the bindings allowing new bindings to be regenerated connecting to the new Push Certificate SID.
Other things that are important for production notifications on twilio programmable chat:
Make sure your environment entitlements file is set to "production"
Don't check the sandbox option on your production certificate (of
course)
Sometimes there can be issues when creating a Push Certificate using
a certsigningrequest that was used on a sandbox certificate. Try
creating a new Cert Signing file just for production
When you test your Production notifications these will only work on an appstore build built with your distribution certificate. You cannot receive notifications on the simulator (obviously). You cannot receive notifications from an app built using development certifcate...so you need to build and upload your app to testflight to test the notifications then preferably test between two real devices...or just send notifications from the simulator to a device with an appstore/adhoc build on it
I cannot thing of anything else for now that I came across. Twilio support is very good and will try and answer your question if you need help.
I've been trying to use AWS SNS service to send notifications to Apple Sandbox environment . I think I setup everything ok and my dev iPhone can get notification without trouble.
But when I start to send notifications to others who install the test app , I keep seeing error message state that
Platform token associated with the endpoint is not valid
With a messageId :147975e0-8a09-5223-8537-256320ab3733
From what I understand , if one device can success, others can success too.
Could anyone tell me how to debug this probelm.
Thanks.
I believe that the apps that the other people are installing were not built with a dev cert (probably built with an adhoc or production provisioning profile), so you probably should use the production certificate.
You could try adding another application on SNS using the production certificate (or the same one, but not using Sandbox, depending on how you generated it), if it works, that this is it.
Also make sure you are using the correct bundle id associated with the certificate.
I've recently started using application insights with a web api.
It will be really helpful to configure app insights to post error messages in a slack channel.
I've seen there is a slack connector but I am not sure how to use it, my guess is that this can be solved with the slack connector and a azure logic app, any tips? tutorials?
You may have a look at this link: https://github.com/Azure/azure-quickstart-templates/tree/master/demos/alert-to-slack-with-logic-app. I followed the instruction and it worked for me.
The tricky part is you need to click the "Deploy to Azure" button on this link page. It would redirect you to Azure Portal, and you will need to specify which channel you want the alert message to be sent e.g. #somechannel. Don't use direct message like #yourname, it has some problem with that and the logic app couldn't deploy for me.
Then you just follow the instruction to find the deployed logic app and authenticate it by logging into slack. And you also need get the logic app URI from the deployment output as in the instruction. Once you put the URI into the alert webhook, you are ready to go!
It's relatively easy to set up a slack webhook.
There's a pretty good C# nuget package for this at https://github.com/nerdfury/Slack.Webhooks
Although you'd need to set up a seperate service to poll and route the app insights data.
There's also commercial options.
getcloudbot.com allows you to hook your Azure Application Insights bundle directly into your slack channel. It's good at staying on top of your services.
Disclaimer : I run it.
You can configure an alert for your error messages https://azure.microsoft.com/en-us/documentation/articles/app-insights-alerts
And then configure sending to Slack using web hooks: https://code.msdn.microsoft.com/Create-Azure-Alerts-with-b938077a
Another quick solution to this, which doesn't involve additional code or a logic app, is to set up a Slack email integration, which provides you an inbound email address for a given channel. You can use that in Application Insights in the "Additional administrator email(s)" field.
This isn't perfect, as you don't really get a lot of details in the post to slack, but it will notify you and provide the name of the alert.
The most easiest path that I found to integrate was using an app named Slack Email which sends email alerts to slack. Once you subscribe this email id to alerts in Application Insights it will start sending the messages on the specific channel you have linked the email to.
https://teamesub.slack.com/apps/A0F81496D-email
No I started use push notification in my project (it worked sometime ago), but can't make it work. I downloade sample-messages project and changed my account and application settings. But messaged don't delivered to receiver. Registration of device is ok. I see my subscribtion. No errors from response when sending notification. What I only got is the json description from logs, when i click my message from queue (but it's in status "sent") Can't get it work. Please, help.
{"notification":{"registration_ids":["APA91bEsqEY2OcaQpgU6Nmk6P7P0fSEdnGuXHSOnUwMJ3ZCAuZC0hGiE_7DX-TlvuAnivJ3Bt4nSM7eEN3AR2Qg2jjCGC8RRT7GbDJgpuy25plCohb23CpD5hLaHo7l-TZvgZhpXjCM0"],"delay_while_idle":false,"data":{"message":"fgjkkkkllkleddxccvvvcxfffffjhghvfg I was ","collapse_key":"event5711312"},"time_to_live":86400},"log":[{"device_token":null,"created_at":"2016-02-23T18:21:42Z","delivered_at":null,"failed_at":"2016-02-23T18:21:47Z","error_code":401,"error_description":"Unable to deliver notification 11778569, received error 401 (Unauthorized, check your App auth_key.)"}]}
I redid all the configuration steps in the link:http://quickblox.com/developers/SimpleSample-messages_users-android#Setup_GCM
Now it is back to work!
Attention to some details:
The API key you have to use in Google cloud console is of the SERVER type
Use the same package name on Android manifest and Google cloud console
Use your application ID from developer console to get GCM token on your Android application
don't forget to copy the google-services.json (generated when you enabled Google services for your app) to app/ directory on your project (the same directory of your src/)