Push notification

i have problem when i use fcm for iphon this code is working but for android notfication arrive but there is wrong i can’t get additional data and two notification arrive

$notification = array(‘title’ =>$title , ‘text’ => $message, ‘sound’ => ‘default’, ‘badge’ => ‘1’);
$data = array(‘type’ =>$type , ‘level’ => $level);
$arrayToSend = array(‘registration_ids’ => $registrationIds, ‘notification’ => $notification,‘data’ => $data,‘priority’ => ‘high’);

and for android this working but for iphone is not working notification not arrive

$data = array(‘title’ =>$title , ‘message’ => $message,‘type’ =>$type , ‘level’ => $level);
$arrayToSend = array(‘registration_ids’ => $registrationIds,‘data’ => $data,‘priority’ => ‘high’);

How i can solve it …???i need one code for all notifications…

Looks like it is server-side code, so your question is related to FCM, try to ask their forums or stack overflow, you’ll got more answers there