且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

通过 Parse 发送推送通知时没有声音

更新时间:2023-02-26 21:57:04

我也遇到了同样的情况,但我使用的是 PHP SDK,正确的发送方式是这种形式.在 $data 中,您需要将要发送到 NSDictionary 用户信息的内容写入.

The same was happening to me, but i using the PHP SDK and the correct way to send this is in this form. In the $data you need to write the things you are sending to the NSDictionary userinfo.

    $data = array("alert" => "Your message", "badge" => "Increment", "sound" => "default");

$query = ParseInstallation::query();
$query->equalTo("deviceToken", $devicetoken);

ParsePush::send(array(
  "where" => $query,
  "data" => $data
));