I can’t send push notifications by running sendPushes.php script from Chapter 6 (the script itself is located in Chapter 7 folder).
At first I thought that this problem was caused by Docker but I think that’s not the case since I’m able to send notifications to a device using sendEncrypted.php (by additionally providing device’s token) script from Chapter 9.
What I’ve already tried to solve this problem:
- Since I was able to send a single notification using sendEncrypted.php then it’s safe ot assume that AUTH_KEY_PATH, AUTH_KEY_ID, TEAM_ID, BUNDLE_ID are correct.
- I’ve added the missing line in chapter 6
I’m pretty sure, that the problem might be caused by the fact that none of the tokes are actually saved to the database ( print_r($stmt->fetchAll(PDO::FETCH_COLUMN, 0)); always prints an empty array).
Any ideas what could be causing this problem?