immobiliare / ApnsPHP

ApnsPHP: Apple Push Notification & Feedback Provider
BSD 3-Clause "New" or "Revised" License
1.44k stars 452 forks source link

Invalid Device Token -- 64 chars required? #76

Open CayenneSF opened 9 years ago

CayenneSF commented 9 years ago

In attempting to use this for a Passbook update, I am getting an "invalid device token" error.

Fatal error: Uncaught exception 'ApnsPHP_Message_Exception' with message 'Invalid device token '9275172de8d10xxx5d4d9d4afdf5eff0'' in /home/xxx/apns/ApnsPHP/Message.php:77

Looking at line 77, the regex test appears to require 64 characters ('~^[a-f0-9]{64}$~i'). The device token I got back from the device, though, is much shorter. Am I using the wrong token?

swey commented 9 years ago

Hi,

you have to use the pushToken. The naming of the property is not that good.