0

I know how to enable/disable push notifications in an iOS app thanks to the help of this question.

But I need to enable/disable push notifications app-side for a particular thread in the app. For example in chat section I have multiple chat rooms and I want to enable/disable push notification for the particular chat room.

Any help on how to achieve this is appreciated.

James Webster
  • 31,873
  • 11
  • 70
  • 114
Nazrul Islam
  • 748
  • 8
  • 16

1 Answers1

0

As the comment suggest, the best way to achieve this is to change your logic back-end regarding when the notifications are sent and allow the user to subscribe/unsubscribe to each set of notifications separately.

App-side, a potential, very roundabout solution might be to send silent push notifications, using content-available (see here), implementing whatever logic is necessary to determine if the user should be shown a notification, then presenting a local notification if necessary. I stress that this is not a solution I advocate, but using it would depend on what control you have over the back end.

James Webster
  • 31,873
  • 11
  • 70
  • 114