API to upload APNs credentials
-
Caio Pellegrini commented
Adding my strong vote for this. This is a critical blocker for any team managing white-label apps at scale.
We manage a Flutter project with over 100 client flavors. I have successfully automated our entire new-client pipeline (running flutter_flavorizr, creating the app via firebase apps:create, and downloading the config via firebase apps:sdkconfig) using shell and Dart scripts.
The only manual step left in our entire process is logging into the Firebase console to manually upload the APNs .p8 key for every new iOS app. This completely breaks our CI/CD automation and is a major source of friction.
As Miguel Queiroz noted, the internal API endpoint for this clearly exists. Please expose this functionality via the public Management API or a firebase-tools CLI command. This feature has been requested since at least 2020 (GitHub Issue #1965 of firebase/firebase-tools project).
-
Miguel Queiroz commented
Please we need this!
We manage apps under projects and need to automate CI/CD.We can already create the app, and setup everything but that part is missing.
I inspected how you do it in Firebase Console.
I could see they do the upload of the certificate .p8 file with this "internal API"
https://mobilesdk-pa.clients6.google.com/v1/projects/[project_id]/clients/ios:[ios_bundle_id]:setApnsAuthKey?key=[firebase console token key??]
the payload is:
{"keyId":"[Certificate .p8 ID]","privateKey":"[Certificate content]"}But I could not find a way to have the right token with the service account to call that endpoint.