function test_updateAppIoscert($name, $description, $release_cert, $dev_cert) { global $apiKey; global $secretKey; $channel = new Channel($apiKey, $secretKey); //如果ios应用当前部署状态为开发状态,指定DEPLOY_STATUS为1,默认是生产状态,值为2. //旧版本曾采用不同的域名区分部署状态,仍然支持。 //$optional[Channel::DEPLOY_STATUS] = 1; $optional[Channel::NAME] = $name; $optional[Channel::DESCRIPTION] = $description; $optional[Channel::RELEASE_CERT] = $release_cert; $optional[Channel::DEV_CERT] = $dev_cert; $ret = $channel->updateAppIoscert($optional); if (false === $ret) { error_output('WRONG, ' . __FUNCTION__ . ' ERROR!!!!'); error_output('ERROR NUMBER: ' . $channel->errno()); error_output('ERROR MESSAGE: ' . $channel->errmsg()); error_output('REQUEST ID: ' . $channel->getRequestId()); } else { right_output('SUCC, ' . __FUNCTION__ . ' OK!!!!!'); right_output('result: ' . print_r($ret, true)); } }
function test_updateAppIoscert($name, $description, $release_cert, $dev_cert) { global $apiKey; global $secretKey; $channel = new Channel($apiKey, $secretKey); //注意百度push服务对ios dev版与ios release版采用不同的域名. //如果是dev版请修改push服务器域名"https://channel.iospush.api.duapp.com", release版则使用默认域名,修改域名使用setHost接口 //$channel->setHost("https://channel.iospush.api.duapp.com"); $optional[Channel::NAME] = $name; $optional[Channel::DESCRIPTION] = $description; $optional[Channel::RELEASE_CERT] = $release_cert; $optional[Channel::DEV_CERT] = $dev_cert; $ret = $channel->updateAppIoscert($optional); if (false === $ret) { error_output('WRONG, ' . __FUNCTION__ . ' ERROR!!!!'); error_output('ERROR NUMBER: ' . $channel->errno()); error_output('ERROR MESSAGE: ' . $channel->errmsg()); error_output('REQUEST ID: ' . $channel->getRequestId()); } else { right_output('SUCC, ' . __FUNCTION__ . ' OK!!!!!'); right_output('result: ' . print_r($ret, true)); } }