-1

I was wondering how mobile news apps send messages where if you click on the push notification, the app takes you to the specific article. I am trying to perform a similar task but have the user generate a message and send it to another user. When the user on the other end receives the message, they should be taken to another view that displays the message data.

Would I use the Firebase In-App Messaging or would I need an external server with the Firebase Admin SDK implemented?

Vinny
  • 75
  • 11

1 Answers1

1

You need to make use of userNotificationCenter(_:didReceive:withCompletionHandler:), firing the appropriate logic based on the contents of your notifications, or the action selected by the user.

See this blog post for an overview of how you can open a specific view controller from the background. As an example, this project on GitHub uses Firebase and seems to do what you're trying to do.

Andrea Gottardo
  • 1,329
  • 11
  • 23
  • I was able to get this working for having the content change when a user clicks on a notification. However, how can I have the user generate the push notification and have the other user receive the notification when the app is in the background? – Vinny Jul 22 '19 at 13:05