iOS Question Firebase Notifications

Semen Matusovskiy

Well-Known Member
Licensed User

Erel

Administrator
Staff member
Licensed User
If it is working with the B4J sending tool and it is not working with your web server then the problem is in the web server. This is all that I can say based on the information you provided.
 

Brandsum

Well-Known Member
Licensed User
If you are using post method to send notification data to FCM server then this following structure is needed for iOS,
PHP:
$fcmNotification = [
    'priority'=>'high',
    "content_available"=> true,
    "mutable_content"=> true, //if you want to modify notification layout
    'to' => '/topics/ios_topic',
    "notification" => array(
      "body" =>  "Body text",
      "title" => "Title Text",
      "subtitle" => "Sub title text",
      'sound' => 'default',
      'badge' => '0'
     )
];
I use this structure to send a notification to iOS using FCM server.
 

Semen Matusovskiy

Well-Known Member
Licensed User
Probably the reason is in API-key

If to open Firebase Console, I see short key "AIza..." in General settings. I am almost sure that our webserver uses exactly it.

But this key does not work with "Sending tool". It works with very long key in "Cloud Messaging".

I am afraid that it's necessary to expand webserver code and to send one message for Android app and another for IOS. Not a problem, but the server is enough busy.
 
Top