Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/asp.net-mvc-3/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Firebase通知给了我;“成功”;但我不知道';无法在IOS上获得通知_Php_Firebase_Codeigniter_Push Notification_Firebase Cloud Messaging - Fatal编程技术网

Php Firebase通知给了我;“成功”;但我不知道';无法在IOS上获得通知

Php Firebase通知给了我;“成功”;但我不知道';无法在IOS上获得通知,php,firebase,codeigniter,push-notification,firebase-cloud-messaging,Php,Firebase,Codeigniter,Push Notification,Firebase Cloud Messaging,我在安卓系统上收到通知,但当我将通知发送到IOS设备时,却没有收到通知,即使它显示成功 我添加了徽章、声音、振动、优先级。。等等,但这些都没有解决问题 function sendNotification($title, $body, $aid,$destination) { $url = 'https://fcm.googleapis.com/fcm/send'; $message = array( 'title' => $title, '

我在安卓系统上收到通知,但当我将通知发送到IOS设备时,却没有收到通知,即使它显示成功

我添加了徽章、声音、振动、优先级。。等等,但这些都没有解决问题

function sendNotification($title, $body, $aid,$destination)
{
    $url = 'https://fcm.googleapis.com/fcm/send';

    $message = array(
        'title' => $title,
        'body' => strip_tags($body),
        'vibrate' => 1,
        'sound' => 1,
        "action" => "url",
        'sound' => 'default', 
        'badge' => '1',
        'priority'=>'high',
        "action_destination" => $destination,
    );

    $fields = array(
        'registration_ids' => $aid,
        'data' => $message
    );

    $headers = array(
        'Authorization: key=KEYHERE',
        'Content-Type: application/json'
    );

    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fields));

    $result = curl_exec($ch);
    curl_close($ch);
}
移动开发者说有一个新的firebase更新,坦率地说,我认为他正在。。。有人能给我解释一下发生了什么事吗?我想我在这里的角色已经完成了,但你们可能会发现我的代码有问题