简体   繁体   中英

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 .

PS: Is there any other Apple API to check if device token is valid ?

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:

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM