iOS Tutorial FirebaseNotifications / Push Messages (server not required)

Status
Not open for further replies.

valentino s

Active Member
Licensed User
Longtime User
If I have more than one aps*.cer file in the key folder I can't create a filebase service and the file firebase_push.p12

This is the error.



If I delete all aps*.cer files except one, it works.

So I can I manage multiples aps_ files for different projects ?

This happens because when I create a push notifications certificate and, Apple let me download a file called aps.cer and not aps_name.cer ?


Thanks
 

fabio borges

Member
Licensed User
Longtime User
Hi guys,
my notification is not being sent and I cant know why.
When I send notification from Firebase console to general, this works, but not by token.
So, I'm trying to send notification direct of the ios application for firebase using Java, with the following library (https://github.com/Raudius/Pushraven) but I dont really know if this is working, there is any way of knowing if the notification is getting in the Firebase?

And assuming that the notification is in Firebase, I'm doubts whether my application in B4i is working properly.

Below is the log when I run the application with B4iBridge.
I am using the certificate in the development mode.

Application_Start
The default app has not Been configured yet.
Configuring the default app.
Application_Active
FCMConnect
HERE
Application_Pushtoken
token = 384CB0332C *
Application_Pushtoken
token = 384CB0332 *
Application_Pushtoken
token = 384CB0332C9C *
Error response:, status code: 0
Error uploading token
Class (b4i_httpjob) instance released.
Error response:, status code: 0
Error uploading token
Class (b4i_httpjob) instance released.
Error response:, status code: 0
Error uploading token
Class (b4i_httpjob) instance released.
FCMConnected
OVERhttp: //192.168.0.102: 8084 / ZipWeb / mobile /
http://192.168.0.102:8084/ZipWeb/mobile/
OVERhttp: //192.168.0.102: 8084 / ZipWeb / mobile / home /
http://192.168.0.102:8084/ZipWeb/mobile/home/
OVERhttp: //192.168.0.102: 8084 / ZipWeb / mobile / authCookie
http://192.168.0.102:8084/ZipWeb/mobile/authCookie
OVERhttp: //192.168.0.102: 8084 / ZipWeb / mobile / home /
http://192.168.0.102:8084/ZipWeb/mobile/home/
OVERhttp: //192.168.0.102: 8084 / ZipWeb / mobile / home / # / ZipWeb / mobile / budgets
OVERhttp: //192.168.0.102: 8084 / ZipWeb / mobile / # budgets / ZipWeb / mobile / home
Application_Inactive
Application_Background
FCMDisconnect
Application_Foreground
Application_Active
FCMConnect
FCMConnected


Some hint of what else should I check?
Thank you!
 

fabio borges

Member
Licensed User
Longtime User
I just checked that the Firebase connection is returning code 200, so, is probably something with my b4i application.

How can I check it?
I'm sending a attached with my Main Application, so you can check.

Thank you!!
 

Attachments

  • ZipPharma.zip
    5.8 KB · Views: 541

fabio borges

Member
Licensed User
Longtime User
Ok, did it, I just changed the API_KEY in the b4j file, and I got the following log:

Program started.
[jobname=fcm, success=true, username=
, password=, errormessage=, target=class b4j.example.main
, taskid=1, req=anywheresoftware.b4a.http.HttpClientWrapper$HttpUriRequestWrapper@1410acf, tag=java.lang.Object@1089e5f
, main=null, httputils2service=null]
{"message_id":8090239757702940595}


But the notification isn't reaching my phone!
 

andyr00d

Member
Licensed User
Longtime User
ok I've tried this 3 times now... At the end when I upload the .p12 file to Firebase console, I am getting: The Bundle ID in the certificate does not match the Bundle ID you entered.

I've followed the steps carefully, is it the package name in build configurations that is causing it?
To be clear: I've copied the push.mobileprovision and aps.cer files to my keys folder
 

andyr00d

Member
Licensed User
Longtime User
The package name in build configurations is the same as my Firebase iOS project name... any other suggestions?
 

andyr00d

Member
Licensed User
Longtime User
Ah that worked! it had a "1" after the name, so I recreated it all and now it's fine. Thanks!
 

tufanv

Expert
Licensed User
Longtime User
my app started not receiving push messages as notifications while on background. Only when i open the app it is coming as msgbox. 2 days ago everything was working fine . I am sure that i use
App.RegisterUserNotifications(True, True, True) 'allow badge, sound and alert
and i allow it. I tried at different devices also. What may be the problem to make it stop working suddenly =
 

tufanv

Expert
Licensed User
Longtime User
it says push token : 0 could not find a aps-environment .

But why did this start hapening suddenly ? what to do to fix it ?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…