I am scheduling a local notification with the attachment array having two files. First one is image and second one is a audio file. When notification is delivered it shows only the first attachement, whether it is audio or image. Is it possible to show multiple attachments without subclassing the UNNotificationContentExtension class and creating the custom interface. Any help would be appreciated. Thank You!
Asked
Active
Viewed 142 times
1
-
u r attaching data or filepath? – Ravi Panchal Apr 11 '17 at 12:49
-
i am attaching url (NSURL) of the file . – Ankur JAIN Apr 12 '17 at 06:01
-
You haven't showed your code, but very likely it's because you're using identical `identifier`s. See [here](https://stackoverflow.com/questions/42742926/why-only-my-last-local-notification-function-is-getting-called/42743041#42743041) – mfaani Jun 22 '17 at 17:35
1 Answers
0
My assumption is that multiple attachments can only be handled by your own custom Notification Content
extensions, as of iOS 11.
The standard iOS notification content view only displays the first attachment. It even discards any additional attachments from the UNNotification
. When you look at a notification that was created with multiple attachments and is displayed by retrieving it with UNUserNotificationCenter.current().getDeliveredNotifications
you will find that it contains only 1 attachment and all others have been discarded.

Manuel
- 14,274
- 6
- 57
- 130