-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Amplify push notifications documentation doesn't include escape hatch (see storage and authentication) #3181
Comments
Hello @drmarkpowell - You can use Pinpoint with push notifications without needing to use user tracking. Is there another reason you would want to use SNS other than not wanting to use user tracking from Pinpoint? |
Hi @drmarkpowell! We've added the escape hatch API to the Push Notifications plugin, which was missing in Swift's implementation. It will be available in the next release. Having said that, the escape hatch will only give you the |
This addition is very welcome! What is the best documentation to explain what IAM policies are needed for using Pinpoint as a service? Our application also uses Govcloud where amplify-cli is not working yet, so it's extra difficult for us to understand what's happening under the hood in order for our cyber DevOps folks to assess whether we can use it. After 2 hours of mostly failures, we were able to tentatively glean that
It would be great to understand what Pinpoint needs to have to operate and thus how we can consider applying it to our use case, which is pretty simple:
|
Using Amplify's Push Notifications in your app does automatically record session-related analytics events on every app launch.
To use Amplify's Push Notifications without using the CLI to set up the resources, here's what you have to do: Create a Pinpoint Project
Create an Identity Pool
Configure the IAM role for Amplify's Pinpoint usage
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Statement1",
"Effect": "Allow",
"Action": [
"mobiletargeting:PutEvents",
"mobiletargeting:UpdateEndpoint"
],
"Resource": "arn:aws:mobiletargeting:*:[AWS ACCOUNT]:apps/[PINPOINT PROJECT ID]*"
}
]
}
Set up Amplify's Push Notifications in your Xcode project
{
"notifications": {
"plugins": {
"awsPinpointPushNotificationsPlugin": {
"appId": "[PINPOINT PROJECT ID]",
"region": "[REGION]"
}
}
},
"auth": {
"plugins": {
"awsCognitoAuthPlugin": {
"CredentialsProvider": {
"CognitoIdentity": {
"Default": {
"PoolId": "[COGNITO IDENTITY POOL ID]",
"Region": "[REGION]"
}
}
}
}
}
}
} That's it 😃! Now you can use Pinpoint to send push notifications to your app users. You can create Segments to target specific users with Campaigns and/or Journeys. |
Describe the content issue:
We don't want to use Pinpoint for mobile push, just SNS. We don't do user tracking in our app.
There is not yet any "escape hatch" tutorial for push notifications that provides guidance on how to drop down to the lower level SDK for SNS (topic subscription, device registration, etc.)
URL page where content issue is:
https://docs.amplify.aws/lib/push-notifications/getting-started/q/platform/ios/
The text was updated successfully, but these errors were encountered: