I created an app using Firebase Notifications Service and published in App Store without any problem, with everything working. Now, I need to create another app using FCN and noticed that one of signing files for Firebase Service has the same name (app.cer). Then, I built a new keys directory and started the same process for the new app. (I followed exactly the same tutorial here: https://www.b4x.com/android/forum/t...h-messages-server-not-required.68645/#content)
But when I try to compile the new app I'm receiving this error from remote host:
error: Missing private key for signing certificate. Failed to locate the private key matching certificate "iPhone Distribution: MARCOS MOREIRA ALVES (624YJ22R62)" in the keychain. To sign with this signing certificate, install its private key in your keychain. If you don't have the private key, select a different signing certificate for CODE_SIGN_IDENTITY in the build settings editor. (in target 'B4iProject' from project 'B4iProject')
I reviewed many times and couldn't have success. The previous app (published in app store) is being compiled normally yet . Does anybody can help? What is this "private key" the server is requiring?
Best to always use the same keys folder. Just give the certificates and provision profiles a different name and set it in the project with #ProvisionFile and #CertificateFile attributes.
This tutorial is only relevant after you were able to build and install B4i-Bridge. If you haven't yet started with B4i then please go over these two tutorials instead: Creating a certificate and provisioning profile Installing B4i-Bridge and debugging first app 5 different files are required...
Best to always use the same keys folder. Just give the certificates and provision profiles a different name and set it in the project with #ProvisionFile and #CertificateFile attributes.
This tutorial is only relevant after you were able to build and install B4i-Bridge. If you haven't yet started with B4i then please go over these two tutorials instead: Creating a certificate and provisioning profile Installing B4i-Bridge and debugging first app 5 different files are required...
Thanks @Erel . I'll check and try again. I created a new directory because, like I told, it looks that is required one app.cer for each app (and the name must to be app.cer to create Firebase push Key).
I'll try to use the thread that u recommend.
1. Firebase push key is only required once when you upload to Firebase.
2. It is actually not required at all as with the new format you can upload it directly.
Creating another folder for this is a big mistake.
Best to always use the same keys folder. Just give the certificates and provision profiles a different name and set it in the project with #ProvisionFile and #CertificateFile attributes.
This tutorial is only relevant after you were able to build and install B4i-Bridge. If you haven't yet started with B4i then please go over these two tutorials instead: Creating a certificate and provisioning profile Installing B4i-Bridge and debugging first app 5 different files are required...
Ok... following step by step tutorial I think that there is a point that isn't very clear. Specifically: when creating a new certificate with a non wildcard app id it generates a new aps.cer file. In the tutorial you overwrites the old aps.cer file in the keys folder (see image). But the old app file is used by the other app (in my case, active in play store). Then, if I want to rebuild/recompile a new version of the old app I'll need to download again its specific app.cer file OR to reserve it in a separated folder before overwrite... that's it?
(I remember, that was the reason because I created a new keys folder...). Am I understanding something wrong?
Until now whenever I wanted to add Push notifications to my apps, I have followed the steps outlined in Erel's tutorial https://www.b4x.com/android/forum/threads/firebasenotifications-push-messages-server-not-required.68645/ This works great except that each year I need to update the APN...
Until now whenever I wanted to add Push notifications to my apps, I have followed the steps outlined in Erel's tutorial https://www.b4x.com/android/forum/threads/firebasenotifications-push-messages-server-not-required.68645/ This works great except that each year I need to update the APN...
In the first app that uses FCN I followed the FCN B4i tutorial but also uploaded the firebase_push.p12 key to Firebase. It's working... I don't know if the keys files/authentication created using the tutorial and the configuration with Firebase is enough (the p12 key maybe is redundant...), but I can't test it now either (because it's a production app and it is working).
I'll test in this new app before to publish.
I agree it is better not to test on a live system.
However, as my current .p12 certificates expire, I have been converting to the new Authentication certificate without any problems.
(I have several customer apps which use Push notifications)
I agree it is better not to test on a live system.
However, as my current .p12 certificates expire, I have been converting to the new Authentication certificate without any problems.
(I have several customer apps which use Push notifications)
I noticed that if you follow the steps in @ErelFirebaseNotifications / Push Messages tutorial, it looks that your system is already using the new Authentication certificate (although you can generate and upload .p12 to Firebase yet).
Then, if I only remove the .p12 file that I uploaded to Firebase will FCN already be using the new method? Is there any other specific process to instruct the Firebase Structure to ignore .p12 file? It's not clear to me...
Until now whenever I wanted to add Push notifications to my apps, I have followed the steps outlined in Erel's tutorial https://www.b4x.com/android/forum/threads/firebasenotifications-push-messages-server-not-required.68645/ This works great except that each year I need to update the APN...
I agree it is better not to test on a live system.
However, as my current .p12 certificates expire, I have been converting to the new Authentication certificate without any problems.
(I have several customer apps which use Push notifications)
Update . I tried the new Authentication certificate in a new app development, replacing the .p12 that was already working. At the first time I thought that didn't work but it looks that Firebase spends a couple minutes to really propagate the new configuration after certificates update (this is an important observation to developers when migrating from .p12 to APN key, specially if you are in a production environment - stress is high during this minutes ?, you know - advice: sit back, take a coffee and relax for a few minutes after updating)
After about 3 minutes the notifications are arriving again!
Thanks for your help @Andrew (Digitwell) and @Erel .