APNS registration isn't always successful on long-lived sessions
daneden opened this issue · comments
Daniel Eden commented
As documented in #79, sometimes notifications aren't always successfully set up. The current workaround involves restarting the app, which forces registration with APNS if it hasn't already happened.
I should investigate the notification registration process when notifications are first enabled from a project's settings to ensure it happens as expected. There should be two points where registration is attempted:
- When first opening the app
a. AppDelegate callsregisterForRemoteNotifications
b.didRegisterForRemoteNotificationsWithDeviceToken
is called, mapping over authenticated accounts and attempts saving them in the Zeitgeist “postal service” remote database against the device token - When enabling notifications (this is where the bug is)
a. TherequestAuthorization
method ought to re-trigger remote notification registration