PurpleTrainElm icon indicating copy to clipboard operation
PurpleTrainElm copied to clipboard

Elm-ify the push notifications code

Open iancanderson opened this issue 7 years ago • 0 comments

This removes the JS code that currently backs push notifications in favor of using the Alert and PushNotificationIOS modules that I'm working on contributing to elm-native-ui: https://github.com/ohanhi/elm-native-ui/compare/master...thoughtbot:ia-push-notifications-ios

The behavior should be the same as before:

  • If we've never pre-prompted a user about push notifications, show them a pre-prompt dialog
  • If they accept, show them the system permissions dialog
  • If they accept that, record their device token in AsyncStorage
  • If they already have a stop selected:
    • Upsert their installation record on the backend so we can send a push notification to the device in the future
  • If they don't have a stop selected, we wait until they select a stop to upsert their installation record

iancanderson avatar Jul 26 '17 20:07 iancanderson