iOS Question Firebase messages are being sent but not received

cooperlegend

Active Member
Licensed User
So code hasn't changed much recently but my firebase messages are not being received on the iOS version of my App, Android version is fine (sending and receiving)
What have I got wrong?
Help much appreciated
 

cooperlegend

Active Member
Licensed User
Thanks Erel

I tried to follow the video tutorial but I got lost in it a bit as the Apple Store options are now out of date (Apple has two options now for push services, which one do I use ?)

I am happy to re-create everything again from scratch, but so far I have failed to get this working.

Log files are not helping, they don't report back anything.

Wasted two hours this morning trying every option I could think off, nothing works (Thanks Apple for making this impossibly complicated)
 

cooperlegend

Active Member
Licensed User
Yes, I can see the logs, but they don't indicate any issues.
I need to just re-create every thing again , Certificates, Profiles, App IDs, firebase stuff, but the tutorial is out of date, I don't know what options to pick
 

cooperlegend

Active Member
Licensed User
See iOS push and Apple Push options, which one? I don't plan on becoming an Apple expert, I just want to get past this hurdle :)
 

cooperlegend

Active Member
Licensed User
This is what I see in the logs

Application_Start
Application_Active
FCMConnected
Application_Pushtoken
 

cooperlegend

Active Member
Licensed User
I have no idea how to resolve this...

I have re-built all my certs/profiles, uploaded and renewed firebase and download the .info, project runs with no errors but still doesn't received messages

aps.cer do I use this one (renamed to ios_sapphire) or do I use the distribution one previously set up (I tried both in my project btw and neither worked)

Help :)
 

tufanv

Expert
Licensed User
just put the aps.cer in the keys file and create the firebase push file later, uplaod the firebase file to firebase console and build your app with your own distrbution profile not aps.cer
 

cooperlegend

Active Member
Licensed User
OK, I started everything from scratch...

I took the existing App ID Identifier (I wasn't able to delete and re-create this as it is used already in the Store)

I then created a new apple push service certificate (aps.cer) and a new Production certificate (IOS Distribution)

Created a new provision certificate for the push service

Created the firebase_push.p12 key

Uploaded to firebase console and downloaded GoogleService-Info.plist and copied this to Special

Checked my App code matches the example

Fired a message off using the B4J code

Android App shows the message

iOS App never triggers the sub Application_RemoteNotification

Log in the App shows

B4X:
Application_Active
FCMConnected
Application_Inactive
Application_Pushtoken
Application_Active
FCMConnected
Why is this not working?????
 

cooperlegend

Active Member
Licensed User
I don't understand???

I am simply trying to get the iOS version of my App to respond the the firebase messages that I am sending , this was working fine in previous releases but it stopped working, I have renewed all the App certs and profiles and the google firebase certificates, but it still doesn't work. It will send messages fine but doesn't receive them :)
Android version of the same App sends and receives message fine.

What do you mean by "The code in the tutorial doesn't match the logs:" ???
 

Sasuke Sama

Active Member
Licensed User
Had a similar issue before and it was my iPhone fault for some reason
Try another device if you can
 

cooperlegend

Active Member
Licensed User
I have tried on my iPod Touch and both iPads that I have.

Seems very odd that it can send a message yet not receive one, would it not be able to send messages if something in the certificates were wrong?

Logs show no errors, code in my App matches the sample code as far as necessary (and was working in previous releases, nothing around this part of the code has changed)
 

cooperlegend

Active Member
Licensed User
So after much hair pulling and zero helpful suggestions from here I finally sussed out what has changed.

For some reason subscribing to a topic "update" no longer works on iOS (but still works fine on Android) I now need to update my code to put in topic "ios_update" (even though I don't want it to only work on Apple)

When did this change?

Is this a firebase library change in B4X ?

topic "update" was work just fine last year.....
 

tufanv

Expert
Licensed User
So after much hair pulling and zero helpful suggestions from here I finally sussed out what has changed.

For some reason subscribing to a topic "update" no longer works on iOS (but still works fine on Android) I now need to update my code to put in topic "ios_update" (even though I don't want it to only work on Apple)

When did this change?

Is this a firebase library change in B4X ?

topic "update" was work just fine last year.....
How are you sending the messages to ios users ? with b4j app or firebase console ? If you are using b4j code, there is a warning about that code saying : "Use the attached B4J (non-ui) program to send messages. It handles ios messages a bit differently. There is an assumption that all iOS topics start with ios_."

so if your topic is not starting with ios_ it is normal you are not receving them but I don't know how you were getting them last year. Using the firebase messaging for years never had an issue but all my topics are starting with ios_
 

cooperlegend

Active Member
Licensed User
Obviously something changed (either in the libraries or in google firebase) Because I have been using firebase for about 3 years now and only recently notice that the iOS version was no longer receiving the messages. The ios_general comment as you have quoted is by no mean definitive (with the word "assumption") so it was only when going back to basics and trying every single possible option that I finally sussed it. So I assume if I change to "ios_update" etc it will still work on Android.
It does nark me that I have to put ios_ infront of everything, why? firebase is a Google tool !!!!!
 
Top