ittybittyapps / appstoreconnect-cli

An easy to use command-line tool for interacting with the Apple AppStore Connect API
MIT License
174 stars 17 forks source link

Create APNS key from CLI #255

Open Yahllil opened 2 years ago

Yahllil commented 2 years ago

Hello, I’m currently working on a white-label app that I want to deploy through a CI/CD. Each version of my white-label app would have a different Firebase project for using Firebase Messaging.

As you probably know, Apple enforces each version of a white-label app to be uploaded through the client’s developer account. That means, that for using iOS Push Notification, an APNS key/certificate would need to be generated for every version of the app through the client’s developer account, and would need to be uploaded to Firebase Cloud Messaging (please see image attached).

I've seen that your App Store Connect CLI tool has an option to create and download certificates, but does not have an option to create and download keys, which are needed to be uploaded to Firebase Console in order for push notifications to work on iOS (.p8/.p12 files).

This is something every white-label app will encounter when using iOS push notifications, so I believe it is something that is worth being added to the CLI, in order to allow automation of white-label apps deployment.

What do you think?

Generating a key through Apple's portal:

Screen Shot 2022-08-12 at 19 06 58

Uploading the key to Firebase Cloud Messaging (through Firebase Console):

Screen Shot 2022-08-12 at 19 08 19