You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the reflection API to remove device tokens from my database, the intention is to respond to iOS app uninstalls or users disabling push.
However, it would appear that the method that I'm using is causing device tokens to be deleted if an APNS is not delivered regardless of the reason.
Below is the only method that I'm overriding in config/initializers/rpush.rb:
Called with a Rpush::Apns::Feedback instance when feedback is received
from the APNs that a notification has failed to be delivered.
Further notifications should not be sent to the device.
on.apns_feedback do |feedback|
d=Pushreg.find_by_devicetoken(feedback.device_token)
[*d].each do |registrationtodelete|
registrationtodelete.delete
registrationtodelete.save
end
end
The text was updated successfully, but these errors were encountered:
Hi,
I'm using the reflection API to remove device tokens from my database, the intention is to respond to iOS app uninstalls or users disabling push.
However, it would appear that the method that I'm using is causing device tokens to be deleted if an APNS is not delivered regardless of the reason.
Below is the only method that I'm overriding in config/initializers/rpush.rb:
Called with a Rpush::Apns::Feedback instance when feedback is received
from the APNs that a notification has failed to be delivered.
Further notifications should not be sent to the device.
on.apns_feedback do |feedback|
d=Pushreg.find_by_devicetoken(feedback.device_token)
[*d].each do |registrationtodelete|
registrationtodelete.delete
registrationtodelete.save
end
end
The text was updated successfully, but these errors were encountered: