0

I'm building an app and want to leverage AWS SNS for the push notifications. The documentation seems a bit spars. I'm not using Cognito, and at the stage where I have got the deviceToken from Apple, the hasn't been a login in any case. The app uses AppAuth for the authorisation.

let defaultServiceConfiguration = AWSServiceConfiguration(
        region: AWSRegionType.USEast1, credentialsProvider: nil)
    AWSServiceManager.default().defaultServiceConfiguration = defaultServiceConfiguration

Obviously 'nil' doesn't work as credentialProvider. Is there anything I can give there to satisfy AWS?

Jorgen
  • 465
  • 3
  • 10
  • 24

1 Answers1

0

Yes, you can.

For that, register the device tokens in a platform application endpoint, so you will receive an ARN reference for it, and then you attach it to your app user's entity at the end. This way you can directly push notifications for each individual user.

Here's a flow for the app token/ARN management: enter image description here

More info here: https://docs.aws.amazon.com/sns/latest/dg/mobile-platform-endpoint.html#mobile-platform-endpoint-pseudo-code

Similar solution applied here: https://stackoverflow.com/a/32684226/3270938

lucgauer
  • 125
  • 1
  • 8