iOS Question Steps with FirebaseNotifications after new provision files

skrjabin

Active Member
Licensed User
This could be a stupid question. But when starting with B4i, I just followed any step in the tutorials with this certificates and provision files and than with integrating also FirebaseNotifications. I was lucky that everything worked, but without total understanding how.

Now, after one year I had to renew as normaly my apple developer account and created new mobileprovision files. Fine, but which steps I have to repeat now in this tutorial for the firebase integration? This files like firebase_push.p12? My app workes, but the firebase messages seems not to arrive now.
 

Semen Matusovskiy

Well-Known Member
Licensed User
Could be different reasons. What did you do with APS certificate ?

B4I obviously uses aps.cer to create firebase_push.p12. So, if aps.cer is new, then firebase_push.p12 is changed.
Meanwhile firebase_push.p12 is used for APNS certificates in Firebase Console.

One year is a big period. I'd download current Googleservice-info.plist in Firebase Console, and also replaced a key of server. And, of course, I'd replace APNs certificates.
 

skrjabin

Active Member
Licensed User
Thanks for response. Now I tried many things. APS certificate was still valid, but I created a new, to be sure. Downloaded aps.cer, created in IDE firebase_push.p12, uploaded it to firebase console, downloaded the GoogleService-Info.plist to special folder. No success.

Than I saw, that I have two Apple Push Services in Apple Certificats. The old and the new one. So I revoked booth and created a new. Of Course repeating all this funny file exchanges (up-downloads) - No success.

Than I saw, that my profiles (Ad hoc and App Store) are not valid any more. Guess, because I revoked the APS Certificates. So with "Edit" I could renew this certificates and download it. App shows no errors, but I can not receive this firebase messages, what ever I try. What else can I do?

This is the log:
B4X:
Application_Start
Application_Active
FCMConnected
GetToken: ...
Application_Pushtoken
PushToken: 1
<B4IExceptionWrapper: (null)>
Class (b4i_httpjob) instance released.
 

skrjabin

Active Member
Licensed User
Apple_Keys_20.09.2019.JPG

This is the Keys-folder. So after aps.cer and firebase_push.p12 I renewed also the mobileprovision files for this App. Is that so OK, did I forget something? Also I renewed the GoogleService-Info.plist in the "Special" folder.
 

skrjabin

Active Member
Licensed User
What are the APNS certificates? Following the tutorials I have just to upload the firebase_push.p12 file to Firebase Console. This I did.
I did not upload a *.p8 file (authentification, because I dont have such file) only this p12, created from the B4i IDE. Is that correct?

I have also a working sending tool to test with. It works perfect for Android and it worked already with my iOS version. So the sending part should not be the problem.
 
Last edited:

Semen Matusovskiy

Well-Known Member
Licensed User
APNs: Settings, Cloud messaging

1.PNG

Note there are two fields - one for development certificate, another - for distribution

Well, hard to imaging what's wrong.

Did you look your App Id in Apple Console. Should be:
2.PNG

3.png
 

Semen Matusovskiy

Well-Known Member
Licensed User
If settings in Apple and Firebase consoles are correct, remains the last - to check API-KEY and a notification format (Android and IOS formats are different).
I'd check Erel's SendingTools. At least, it will be visible what returns fcm.googleapis.com/fcm/send
 

skrjabin

Active Member
Licensed User
It works!!! :) Hard to say, what the reason was. I started now from zero with all this files on the apple account and it is working.

Thank you a lot for your support!!!
 
Top