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 ?