Open rshah98626 opened 4 years ago
We gotta figure out if we want to implement this using the chat controller we've already created, or if we want to pull in a third-party solution.
With APN push notifications, we should be able to set up communication between our app and our server by posting to Apple's push notification server (sandbox version: api.sandbox.push.apple.com:443). When we receive a notification, we trigger a MessageAPI callback which tells the app to fetch messages from the server.
If the app is closed, we send an alert using a push message, otherwise the controller should just display the new info we loaded as we triggered the callback to update the chat's view model.
More info on push notifications can be found here: https://developer.apple.com/documentation/usernotifications https://www.raywenderlich.com/8164-push-notifications-tutorial-getting-started
After a driver reserves a ride they should be able to communicate with the rest of the people in the ride. This chat should be shown after a rider chooses a ride and is approved by the driver.