AWS SNS EndPoint disabled when publishing - ios

So im using AWS SNS to send push notifications to apple devices.
I've followed the following steps:
Created an app ID
Created a APNs Production iOS certificate
Created .p12 certificate to use in AWS SNS
Created AWS SNS Application
Config in iOS App (It works. I get deviceToken and creates an EndPoint to AWSSNS App)
When i publish a message to that EndPoint: Message publishe with request...
But the notification never appears on the device.
Then i check the endpoint and Enabled = false
Hope anyone can help. Thanks.

On Amazon SNS AWS Management Console, select Applications > your application > Actions > Configure events. Here you can set up an Amazon SNS topic for Delivery failure. You should take a look at the error published to the topic. It should give you why it is failing and possibly a solution for how to fix it.
See Amazon SNS Documentation for more details.

I'll answer my question:
I've solved it using Dev certificate when creating p12, then use it in AWS SNS website. Go to Xcode-> Use Dev Certificate & Dev Provisioning profile and now it works :)

Related

Firebase Cloud Messaging: how to upload APNs authentication key?

In the official Firebase documentation it says that we need go to the Project settings and in Cloud Messaging Tab add APNs authentication key. However, when I go to the Cloud Messaging tab I see only Web Push Certificates, there is no possibility to upload APNs authentication key for IOS app there. How to upload this key to Firebase project?
I figured out what was wrong, I didn't have correct permission in Firebase console, once I got owner permission, I was able to see upload UI for APN key.

Can I push notification using FCM without upload p12 or p8 certificate file

I have problem with my company's project. Other team building server and my job is only frontend.But I can't receive any notification. They said they use FCM to push notification but on project setting -> Cloud Message on firebase console not have any p8 or p12 certificate file is uploaded. I have no idea about that, i'm new on firebase tech, anyone have idea for that.
Are you able to see anything under the APNs Authentication Key section?
There is a way to send push with APNs Authentication Key. Check out this link - https://firebase.google.com/docs/cloud-messaging/ios/client#upload_your_apns_authentication_key. Probably this will help.

Firebase or APNS not working

I have an ASP.NET MVC5 Application which I have moved from Microsoft Azure to AWS i.e. Redeployed from Microsoft to AWS. Can moving servers from Azure to AWS affect Firebase service in any way? My push notifications have stopped for my iOS client. Do I need to do something at Apple's end i.e. APNS etc.?
Found the Answer:
I was building a developer App with the developer Profile.
Needed to create an APNS certificate for developer builds.
Needed to upload the APNS to the firebase console.

AWS Cognito SMS delivery Issue with iOS

We are facing some technical issues with sms service in iOS AWS Cognito login. I signed up with my account details in AWS Cognito and I got below O/P,
Response body:
{"CodeDeliveryDetails":{"AttributeName":"phone_number","DeliveryMedium":"SMS","Destination":"+********8888"}}
But still am not received any sms from aws. This happened only today, but yesterday it works fine. Is there anything I have to set in my AWS account settings. Anybody knows what is the exact limit for sms. I refer some tutorials, and they ask me to request amazon customer service in order to extend the limit. Anyone have any idea about this? what is the correct procedure to handle this? If you know about anything, It would be helpful for me. Thank you!
Cognito Identity uses AWS SNS to dispatch SMS to your users. The pricing of the SMS dispatch can be found in AWS documentation.
You can monitor your SMS deliveries by subscribing to daily usage reports from Amazon SNS. Each day that you send at least one SMS message, Amazon SNS will deliver a usage report as a CSV file to an Amazon S3 bucket that you specify. You'll find details on the setup in AWS documentation.
If you can't find relevant hints to solve your issue in those reports, you should contact AWS support directly from your AWS console.
Regards,

Using Amazon SNS with React Native

Can anyone provide a simple example of using the Amazon SNS service to send and receive Push Notifications under React Native?
I've got the Amazon SNS service setup, and I can publish a message from the website and have it appear on an iPhone – if I manually enter the device token and initiate the publish on the Amazon website. Now I want to automate the process of registering the Push Token in Amazon SNS, and allow the app to Publish a push to the SNS service.
I know that Amazon has a very new project to integrate their SDK into React Native, but I cannot get it working. Support on that repo is spare too, so I'm hoping someone here can help.
Right now what I get is: Undefined is not an object (evaluating 'cognateClient.initWithOptions')
The GitHub issues mention something similar on Android, but obviously that doesn't help with my iOS app.
What I'm looking for is a step-by-step breakdown of how to integrate Amazon's code in to an existing RN app. They don't provide a standard Node package, so I'm struggling to figure out how to get the React Native code and the SDK to play nice with Xcode.
Any suggestions? Thanks!
There's no 'integration' of AWS into the RN app needed. You just need the device token from RN.
Use a package like RNPN (https://github.com/zo0r/react-native-push-notification) in order to get the device token your phone generates. When you have that, make a call to your api, and your api is then responsible to call out to SNS to register that device token as an SNS 'endpoint'.
Translate this pseudo-code into whatever your API is written in: https://docs.aws.amazon.com/sns/latest/dg/mobile-platform-endpoint.html
In short...
RNPN onRegister ->
POST /registerDevice on your api ->
call AWS
createPlatformEndpoint from your api ->
start sending messages from your api
Most likely you'll want to store some relationship from user -> deviceToken+platformEndpoint in your db/data store.
Then you can send notifications from your api. Wrote up how to do that here: https://medium.com/#duhseekoh/send-a-push-notification-using-aws-sns-javascript-sdk-2f117e9c4180
Im using react-native-fcm with Amazon sns, it will register my device token and then we are sending that token to our php solution that then add the device to a subscription on a topic in SNS, passed back to the app is the subscription token and endsub tokens. Then we Push Messages to the topic thru SNS. Works on both iOS and Android.

Resources