Jasminder Pal Singh
Jasminder Pal Singh

Reputation: 512

Check if iOS Device Token is valid

I am working on iOS app Push Notifications with PHP. Whenever the app is opened ,it sends a device token to the remote server . Now while sending the notification to all the device tokens , Looping through all the device tokens to send notification . I want to delete the invalid tokens on the check by checking response someone . I tried many workarounds like reading the response with fread . But doesn't seems to work .

P.S: Is there any other Apple API to check if device token is valid ?

Upvotes: 3

Views: 6678

Answers (1)

Wajih
Wajih

Reputation: 4383

Take a look at this Local and Remote Notification Programming Guide from Apple.

go to HTTP/2 Response from APNs header and check this table:

enter image description here

Upvotes: 1

Related Questions