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
Pinpoint Notifications always use APNs Sandbox channel #4875
Comments
@Niklas-Sommer thanks for taking the time to raise this issue. Amplify will decide the appropriate channel based on the application's compiled environment and if it is running on debug mode it registers the endpoint as APNs Sandbox . While we investigate, could you please verify whether the release app is running in debug mode using
|
I did test that and it is indeed running in release mode. As stated above it even gets registered in pinpoint as an APNs endpoint but I still only receive push notifications when I send it to the APNs Sandbox channel. That's the error I get when sending a test message with the pinpoint console to the the APNs channel:
|
@Niklas-Sommer thank you for providing these details. we will look into this issue and get back to you with any updates. |
@Niklas-Sommer when running |
I am launching my flutter project from VS Code in release mode so I didn't specify any. Not sure which arguments vs code passes when launching. |
Just tried running from the command line with
Still does not work |
@Niklas-Sommer sending notifications directly through the Pinpoint console to both APNS and APNS_SANDBOX channels with tokens and only APNS_SANDBOX is successfully delivered indicates that the device token received from APNs is for the sandbox environment. |
Hi @Niklas-Sommer, I've been able to reproduce this on a fresh Amplify Flutter app. I'm still investigating the root cause, but wanted to update you in the meantime. I'll provide more information when I have it. |
Hi @Niklas-Sommer, it appears running the app with the release flag is not sufficient for iOS to setup the correct production environment. I was able to successfully receive a
For both scenarios ensure you don't have a pre-existing version of the app already installed. And ensure you have a method of retrieving the device id. Note: when the app is built this way Let us know if this resolves the issue for you or if you have additional questions. |
Well that was a quick fix :D Thanks a lot for the help! It would be great if this was mentioned in the documentation though! |
Description
I am working on a flutter app that uses amplify and use cognito for user authentication and pinpoint to send push notifications. I am calling a lambda function to send my push notifications. This lambda function looks up all the endpoints registered to one user and sends the push notification to all of them. Everything works perfectly fine when launching in debug mode but when I launch my app in release mode the messages are not delivered. When looking through the cloud watch logs of my lambda function I can see that amplify correctly registers the endpoint as APNs Sandbox for the debug build and as APNs for the release build. Since they seem to be correctly registered I tried sending a test message using the AWS pinpoint console and found out that alltough the endpoint is registered as APNs the messages only get delivered when sent to the APNs Sandbox channel in both debug and release build. I created another bare bones test project and was able to reproduce this issue.
Categories
Steps to Reproduce
Screenshots
No response
Platforms
Flutter Version
3.19.6
Amplify Flutter Version
^1.7.0
Deployment Method
Amplify CLI
Schema
No response
The text was updated successfully, but these errors were encountered: