Search code examples
iosswiftnotificationspush-notificationsinch

Sinch notifications don't show up when app is not open


I am developing an ios app using Sinch with swift and notifications are showing when the app is working in background but when I close the app, notifications won't show up. All resources in Sinch docs are in Obj-c that's why I am asking this question in here. Is there anybody worked with Sinch using swift and can explain to me little bit.


Solution

  • Its actually not a swift thing at all, it applies to objective c as well :D When you open the app and you have pushed a notification (or not) you will receive a regular on message recieved to you MessageClient delegate, when you get that and are not in the chat screen you need to decide what you want to do, either show in in app notification or take the user to that screen (I suggest showing an in app notification)