-
Notifications
You must be signed in to change notification settings - Fork 38
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
Testing notifications in Sandbox #82
Comments
Hello @SheepBroadcast Thank. |
This is the code I am using. It's a simple php file running on my web server, that I then load via a browser. Excluded from the paste are my p8 file, the key id, the team id and the device token string, but they are defined and used in the code as you can see. Edit: As for the screenshot you are requesting - I can't understand what you want me to screenshot? |
So, I should see you device token (without team id, key and private key), only you token for you device which you receive in you application. Why? Because in
You write previosly:
But I don't understand, where you check this token, because our rules based on official documentation - only hex decimals. You receive error: P.S. You code is nice, and code does't have any problem. Please check correct pass all data (team id, private key, token) before sending notification. Maybe you use copy/paste for device token and lost few bytes.... |
I've tried everything I could think of, looking at the docs, the examples, but I just can't get the library to work with development device tokens. Tried creating a UriFactory and setting the "sandbox" variable to true, but that didn't help. I validated my token through the Push Notifications console in my Apple Developer account, this is what the validator is giving me:
"Device Token is valid for sending Alert & Background push-type notifications in the Development environment"
But no matter what I try to push a test notification, this is what I always get:
"Failed to send notification: Bad device token."
Can I not use the development sandbox environment with this library?
The text was updated successfully, but these errors were encountered: