Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multicast Feedback #2

Closed
TheCrab-xx opened this issue Apr 4, 2022 · 4 comments
Closed

Multicast Feedback #2

TheCrab-xx opened this issue Apr 4, 2022 · 4 comments
Labels

Comments

@TheCrab-xx
Copy link

Hi, could you please help me to understand how to implement feedback with multicast message?
Thank you

@sunaoka
Copy link
Owner

sunaoka commented Apr 5, 2022

Please be specific about what you don't understand.

@TheCrab-xx
Copy link
Author

TheCrab-xx commented Apr 5, 2022

I'm using this approach, but I receive "540 Gateway Timeout"

$batch_of = 500;
  $batch = array_chunk($deviceTokens, $batch_of, true);

  foreach ($batch as $tokens) {

      $driver = new APNs\Token($options);
      $pusher = new Pusher($isSandbox);
      $feedback = $pusher->to($tokens)->send($driver);

      foreach ($deviceTokens as $token) {
        if($feedback->isSuccess($token)){
          $result['success'][] = array("token_success"=>$token);
        }else{
          $result['failed'][] = array("error"=>$feedback->failure($token));
        }
      }
    echo $result;
  }

@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Feb 24, 2023
@github-actions
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants