In Facebook App, if you change push notification settings just for messages from the Settings.App (not from Facebook App) they stop coming even if you dont open Facebook App.
How does Facebook sync user defaults to backend even if the user does not open the Facebook App ever? Is there a way to 开发者_如何学编程read NSUserDefaults from backend or is Facebook using a known filtering convention for push notifications that Apple supports.
To Test:
- Make sure FB App is closed in iphone
- Open settings app, go to Facebook settings, disable notifications "only for" messages.
- Ask your friend to send you a message on Facebook, you will NOT receive a push.
- Go back to settings app and re-enable notifications for messages
- Ask your friend to send you a message on Facebook, you will receive a push.
Question:
- How come Facebook can update their notification settings before user opens the Facebook App?
Facebook only knows that the user wants receive Push Notifications the first time the app is launched. The user is asked if they'd like to allow notifications. (The same standard alert all apps use)
After this Apple controls everything else. If the user turns off push notifications for any app, Apple stops alerting the user. It's Facebook's responsibility to check if the device is still active, but even if notifications are sent the user won't receive them.
精彩评论