Amplify-cli: "amplify env pull --restore" disables apns in notifications module

Created on 21 Oct 2019  Â·  3Comments  Â·  Source: aws-amplify/amplify-cli

Note: If your issue/bug is regarding the AWS Amplify Console service, please log it in the
Amplify Console GitHub Issue Tracker

Describe the bug
"amplify env pull --restore" disables apns in notifications module:

To Reproduce

  • add notifications module
  • add APNS channel with p12 key with CLI
    amplify notifications update
    ? Choose the push notification channel to configure. APNS
    ? Do you want to enable the APNS channel Yes
    ? Choose authentication method used for APNs Certificate
    ? The certificate file path (.p12): notif.p12
    ? The certificate password (if any):
    MAC verified OK
    ✔ The APNS channel has been successfully enabled.
  • amplify push
  • verify everything works and you can send notifications
  • amplify env pull --restore

✔ Initialized provider successfully.
✔ Channel information retrieved for APNS
✔ Channel is not setup for FCM
✔ Channel is not setup for Email
✔ Channel is not setup for SMS
✔ The APNS channel has been disabled.
Initialized your environment successfully.

I have to run amplify notifications add to add certificate again every time anyone pulls

Expected behavior
I should only provide certificate once and it should never erase it on pull

bug notifications

Most helpful comment

PLEASE WE NEED THIS FIX SUDDENLY !!!

All 3 comments

PLEASE WE NEED THIS FIX SUDDENLY !!!

This issue also relevant to FCM and SMS channels.
@kaustavghosh06 can you please let us know what is the status of this issue?

my workaround was to manually create 2 pinpoint projects one for APNS and one for APNS_SANDBOX and then directly use their application ids from all of my environments.
let apnsConfig = [
{
// The Amazon Pinpoint project ID that you want to use when you send this
// message. Make sure that the push channel is enabled for the project that
// you choose.
applicationId: "blah",
channelType: "APNS"
},
{
applicationId: "blah",
channelType: "APNS_SANDBOX"
},
];

Was this page helpful?
0 / 5 - 0 ratings