public function pushAPN($pDevicetoken) { $template = new IGtAPNTemplate(); $template->set_pushInfo("", 1, "推送的要不要", "", "", "", "", ""); $message = new IGtSingleMessage(); $message->set_data($template); $ret = $this->pushAPNMessageToSingle($this->tAppid, $pDevicetoken, $message); var_dump($ret); }
function pushAPN() { $igt = new IGeTui(HOST, APPKEY, MASTERSECRET); $template = new IGtAPNTemplate(); $template->set_pushInfo("", 1, "dd", "", "", "", "", "", 1); $message = new IGtSingleMessage(); $message->set_data($template); $ret = $igt->pushAPNMessageToSingle(APPID, DEVICETOKEN, $message); var_dump($ret); }
/** * 单推APN接口示例 * @param $token 推送的客户端APN标识 * @param $c 推送消息显示的内容 * @param $p 推送消息的数据内容 */ function apnMessageToSingle($token, $c, $p) { global $igt; $template = new IGtAPNTemplate(); //$template ->set_pushInfo($actionLocKey,$badge,$message,$sound,$payload,$locKey,$locArgs,$launchImage); $template->set_pushInfo("", 1, $c, "", $p, "", "", ""); //单个用户推送接口 $message = new IGtSingleMessage(); $message->set_data($template); $ret = $igt->pushAPNMessageToSingle(APPID, $token, $message); var_dump($ret); }