Jordin Vell
Jordin Vell

Reputation: 221

Ionic+Capacitor Push Notifications via Amazon SNS

How to use Ionic+Capacitor to register Push Notifications via Amazon SNS

Any guide on how to properly use ionic and capacitor to acquire tokens for SNS? I’ve seen the PushNotifications plugin but I’m not sure what “register” does? Do i have to setup my firebase and apn if im only using Amazon SNS?

Any guide/tips or overview steps will be useful.

Thanks

Upvotes: 1

Views: 1394

Answers (1)

Jordin Vell
Jordin Vell

Reputation: 221

Hoping this would help anyone starting their Ionic+Capactior + FCM/APN + Amazon SNS journey

Device Token Setup

  1. Follow this guide: https://capacitorjs.com/docs/guides/push-notifications-firebase. Follow all of them except all of the iOS Firebase ones (unless youre planning to use FCM to push to iOS as well)
  2. Everytime the plugin runs, it should return a device token, log that or save that somewhere.

SNS Platform Setup

  1. Feel free to follow any guide that teaches you how to create an FCM endpoint and an APNS endpoint. They're pretty straightforward, Cloud Messaging URL for FCM and a .p8 APNS key for iOS.

SNS Endpoint

  1. Open your created platform application and Create a new endpoint, just chuck in the device token from the plugin. FCM and APNS have different token formats, APNS are mostly alphanumeric and all caps, while FCM are with special chars and mix of capital and small letters.

Of course this is just to establish a base point, I'm still working on trying to make them into services to actually push notifications via code. Good luck!

Upvotes: 0

Related Questions