Open digital-build opened 1 year ago
Hi @thomas-mz,
Good afternoon.
The logic for the AWSSDK.Pinpoint
package is auto-generated by the service models and the behavior is controlled by the Pinpoint service. The AWS .NET SDK simply relays the message request to the Pinpoint service. Just to clarify, you are asserting, that you are able to send push notifications using ChannelType as GCM
. Shouldn't the ChannelType
be APNS
as per details at https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html under APNSMessage
?
Also refer the following:
CreateMessageRequest
) based on the service (kindly note that for the said example it is using GCM
).Thanks, Ashish
Hi @ashishdhingra,
Thanks for your review Ashish,
Regarding your question 'that you are able to send push notifications using ChannelType as GCM. Shouldn't the ChannelType be APNS'
Here are my responses, followed by the questions at the bottom.
I believe that 'Pinpoint should be able to use FCM channel to relay FCM configured 'RawContent' to 'FCM APNs interface' in Google Firebase for iOS devices' through FCM Channel. Please review the following related information, as per Google Firebase Documentation 'and' by the successful execution result with Raw content of GCM message using 'AWS CLI' and 'Amazon Pinpoint Console' that I provided already.
Google Firebase Documentation:
'FCM iOS device token with FCM APNs interface' https://firebase.google.com/docs/cloud-messaging/ios/client 'FCM APNs interface' (https://firebase.google.com/docs/cloud-messaging/ios/receive)
'Actual' execution result via Pinpoint Console
The attached screenshot shows successful delivery of GCM message using Pinpoint Console test with FCM Channel.
Also got the same result from AWS CLI (please note the ChannelType": "GCM")
% cat rawcontent.json
{
"Addresses": {
"*** put your own iOS device GCM token ***": {
"ChannelType": "GCM"
}
},
"MessageConfiguration": {
"GCMMessage": {
"RawContent": "{\"notification\": {\"title\": \"Hello Android World!\",\"body\":\"From PinPoint CLI\"},\"data\":{\"custom\":\"123 Penny Lane\"}}"
}
}
}
% aws pinpoint send-messages --application-id { your pinpoint project Id } --message-request file://rawcontent.json
Questions:
1. How to deliver FCM Push Notification Message with Pinpoint DOT.NET SDK to iOS devices?
2. How to send customized push message payload to iOS devices?
3. As SDK described for ‘RawContent’ field, why does SDK won’t override all other fields values to use the 'real' raw content values?
Describe the bug
Hi team,
Pinpoint C# SDK is NOT working as described.
I was trying to send push notification for iOS with FCM configurations. It is successfully delivered to my iPhone within Pinpoint Console 'and' AWS CLI, however with dot.net SDK it seems not properly translate the request, so it is NOT delivered to the actual devices.
✅ When it runs with AWS CLI (working fine)
run the following command will deliver the Push message to the iOS devices without issues
✅ When it runs Amazon Pinpoint Console
(working fine with the same rawcontent into the Amazon Pinpoint Console 'Raw message')
🙁 Now, using the Pinpoint SDK:
Questions:
Please refer to the attached PDF as well. Pinpoint.SDK.wont.deliver.FCM.raw.content.to.iOS.pdf
Expected Behavior
Expecting the RawContent would override as it described in the definition of the property (as below)
So, expecting it to be delivered through 'GCM' channel.
Current Behavior
However, unlike the good result of AWS CLI 'and' Amazon Pinpoint Console, Pinpoint SDK is NOT deliver the message to the FCM properly, seems to be occurred by 'empty' channel type which seems to be miss-translated by the SDK to me ("ChannelType": {}).
Reproduction Steps
How to reproduce: here is console app source code to reproduce
Possible Solution
Pinpoint.SDK.wont.deliver.FCM.raw.content.to.iOS.pdf
Additional Information/Context
Pinpoint Project / Application ID: b97b7129ff194636995628957bc4fc45 AWS Region: us-east-1 API/SDK: AWSSDK.Pinpoint 3.7.100.3
AWS .NET SDK and/or Package version used
Pinpoint 3.7.100.3
Targeted .NET Platform
.NET 6
Operating System and version
Windows 10, OSX Monterey, AmazonLinux