public function SendBatchUniMsg(array $channlIds, $title = null, $content, array &$err = array()) { //andriod push start $sendAndInfo = array('title' => $title, 'description' => $content, "custom_content" => $this->getInfo()); $ars = $this->pushSdkAnd->pushBatchUniMsg($channlIds, $sendAndInfo, $this->opts); // if($ars === false) { $err['and']['code'] = $this->pushSdkAnd->getLastErrorCode(); $err['and']['msg'] = $this->pushSdkAnd->getLastErrorMsg(); // } //andriod push end //ios push start $sendIosInfo = array_merge(array('aps' => array("alert" => $content)), $this->getInfo()); foreach ($channlIds as $channlId) { $irs = $this->pushSdkIos->pushMsgToSingleDevice($channlId, $sendIosInfo, $this->opts); // if($irs === false) { $err['ios']['code'] = $this->pushSdkIos->getLastErrorCode(); $err['ios']['msg'] = $this->pushSdkIos->getLastErrorMsg(); // } } //ToDo 批量推送有问题 // $irs = $this->pushSdkIos->pushBatchUniMsg($channlIds, array('aps'=>array("alert"=>$content)),array('opt'=>array('deploy_status'=>1))); // if($irs === false) { // $err['code'] = $this->pushSdkIos->getLastErrorCode(); // $err['msg'] = $this->pushSdkIos->getLastErrorMsg(); // } return $ars || $irs; // ios push end }