Questions tagged [unnotificationserviceextension]

UNNotificationsServiceExtension is one of the extensions that can be added to a regular iOS app. It would be like a small separate app that can process UNNotifications arriving to the app.

UNNotificationsServiceExtension is one of the extensions that can be added to a regular iOS app. It would be like a small separate app that can process UNNotifications arriving to the app.

One reason for adding this extension is that even when the associated iOS app is not running, the extension can receive the UNNotification and process it, including changing/setting the badge number.

It can share data with the associated iOS app through a shared UserDefaults.

88 questions
58
votes
5 answers

how to display image in ios push notification?

iOS 10 introduced push notification framework updates, UserNotificationsUI.framework As written on apple docs, it lets us customize the appearance of local and remote notifications when they appear on the user’s device. So if anyone have idea how…
29
votes
20 answers

iOS10 UNNotificationServiceExtension not called

Im implementing new iOS10 extension to use rich notifications. Im trying to test it on push notifications but is not working, I just receive a simple notification and is not going through the extension. I did all that it's specified in the official…
24
votes
10 answers

iOS 10 don't call Notification Service Extension

I tried to implement the new Notification Service Extension, but I have a problem. In my NotificationService.swift file I have this code: class NotificationService: UNNotificationServiceExtension { var contentHandler: ((UNNotificationContent) ->…
just
  • 1,900
  • 4
  • 25
  • 46
22
votes
4 answers

UNNotificationAttachment with UIImage or Remote URL

In my Notification Service Extension I am downloading an image from a URL to show as UNNotificationAttachment in a notification. So I have this image as UIImage and don't see the need to write it in my app directory / group container on disc just…
15
votes
2 answers

Can't attach debugger to UNNotificationServiceExtension

I'm not being able to use the debugger in a UNNotificationServiceExtension. Here's what I do when attempting to attach the debugger to the UNNotificationServiceExtension: Run app Set the breakpoint in the "Testing"…
user3427013
  • 1,039
  • 1
  • 13
  • 28
14
votes
1 answer

Hide notifications received through NotificationService Extension

I'm using the NotificationService Extension target to be able to modify push notifications before they are presented. It's working well but there is some notifications that I would like to not present to the user after they have been processed. I'v…
11
votes
1 answer

Do i require distribution provisioning profile for notification service extension for iOS?

I am not getting proper documentation for Notification Service Extension's provisioning profile. But as per my knowledge, the Notification Service Extension has it's own bundle id, it must be set up with it's own App ID and provisioning…
11
votes
4 answers

UNNotificationAttachment failing to attach image

So the following code is being used to attach an image from local storage url of an image. I check in Terminal to see if the image is stored and it does store the image without any issues. So ruling out any issues with the url itself. do { let…
9
votes
0 answers

iOS NotificationServiceExtension is not working

I have enabled NotificationServiceExtension in my app. And done the following Added .apppex under Frameworks, Libraries and Embedded contents Confirmed both deployment target version is 12.0 Sending mutable-content": 1 in my apns notification…
Beu
  • 1,370
  • 10
  • 23
9
votes
1 answer

Multiple Notification Service Extension in one app

Is it possible to add Multiple Notification Service Extension in one app?If Yes, then how to recognize which one will be used and how? Basically there are two service providers for my app and both of them have their own payload for notification…
7
votes
1 answer

Test Rich Notifications in Simulator

I am able to test the normal notifications in Simulator, but when I tried to test rich notifications nothing happens, event title is not getting updated. Could you please assist me, how to proceed. Do I need to change any simulator settings? I am…
6
votes
0 answers

iOS: How to skip the push notification without being displayed when using notification service extension?

I am using Notification service extension to receive chat messages via push. Previously I was using VOIP to deliver chat messages. But with the new update from iOS 13 to restrict the usage of VOIP, I moved to Silent Push. But I could't handle the…
6
votes
2 answers

Sharing data between an notification service extension and main app

In my scenario, I'm sharing data between the parent iOS app and notification service extension. I'm using Xcode 10.2.1, iOS Deployment Target 10.0 We have tried the NSUserDefaults and Keychain group it's working as expected. Is any other way to save…
6
votes
2 answers

Accessing App code from Notification Service Extension

Notification Service Extension modifies the content of a remote notification before it's delivered to the user. For example if a remote notification contains an image URL, Notification Service Extension can be used to fetch the image and show it in…
5
votes
3 answers

macOS Notification Service Extension not being used

I have a notification service extension for my macOS app. Here is the code for that extension: import UserNotifications class NotificationService: UNNotificationServiceExtension { var contentHandler: ((UNNotificationContent) -> Void)? var…
Tom Shen
  • 1,838
  • 3
  • 19
  • 40
1
2 3 4 5 6