Open Shagun-29 opened 3 years ago
Notifications are received on android but not iOS devices.
// fcm_id <--- for device $optionBuilder = new OptionsBuilder(); $token = $fcm_id; $optionBuilder->setTimeToLive(60*20); $notificationBuilder = new PayloadNotificationBuilder($title); $notificationBuilder->setBody($builderMsg)->setSound('default'); $dataBuilder = new PayloadDataBuilder(); $dataBuilder->addData(['message' => "Message Sent"]); $option = $optionBuilder->build(); $notification = $notificationBuilder->build(); $data = $dataBuilder->build(); $downstreamResponse = FCM::sendTo($token, $option, $notification, $data); $downstreamResponse->numberSuccess(); $downstreamResponse->numberFailure(); $downstreamResponse->numberModification();
Any luck with this issue? We can't figure it out.
Looks like that, I tried but I am also cannot receive notification. Did you solve it?
Notifications are received on android but not iOS devices.