0

I can't seem to find any examples or use cases for using a UNNotificationAttachment for an audio file in a UNNotificationServiceExtension. Could someone give both a code sample and a reason why it's needed? Would audio added to the attachment through a UNNotificationServiceExtension just play automatically?

1 Answers1

0

It's not of that much of use, but If you are a media company and you want to promote your new song and want users to have a glimpse of it, you can send it via push notification. Also, if you want to promote some sale/offer you can send a voice note to all of your users. Any Alert message can also be sent.

Code is basically same for downloading all kinds of Rich media push notifications. Very less you have to manage at your end, For Code follow these answers,

Swift : https://stackoverflow.com/a/50903844/5084797

Objective C : https://stackoverflow.com/a/50523908/5084797

manishsharma93
  • 1,039
  • 1
  • 11
  • 26