public function PushAllIos($content)
 {
     $iosConfig = $this->config['iOS'];
     $accessId = $iosConfig['accessId'];
     $secretKey = $iosConfig['secretKey'];
     $environment = $iosConfig['environment'] == 'production' ? XingeApp::IOSENV_PROD : XingeApp::IOSENV_DEV;
     return XingeApp::PushAllIos($accessId, $secretKey, $content, $environment);
 }
Esempio n. 2
0
 /**
  * 推送消息给所有设备
  * title和environment区分IOS还是ANDROID
  */
 public static function pushAllMessage($paramArr)
 {
     $options = array('accessId' => '', 'secretKey' => '', 'title' => '', 'content' => '', 'environment' => 0);
     if (is_array($paramArr)) {
         $options = array_merge($options, $paramArr);
     }
     extract($options);
     if (!$accessId || !$secretKey || !$content) {
         return false;
     }
     if ($environment == 0 && $title) {
         //ANDROID
         $ret = XingeApp::PushAllAndroid($accessId, $secretKey, $title, $content);
     } else {
         //IOS
         $ret = XingeApp::PushAllIos($accessId, $secretKey, $content, $environment);
     }
     return $ret;
 }