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
0
votes
1 answer

clang: error: linker command failed with exit code 1 (use -v to see invocation) Xcode 10.2.1

I know this question has been asked a lot of times and there are many probable answer, but none of them helped me to get over my problem. Here some possible solution's which I am trying out. Solution1 Solution2 and many suggested solutions on the…
0
votes
1 answer

What's a use case for a UNNotificationAttachment with an audio file?

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…
0
votes
1 answer

UNNotificationAttachment with UIImage exceeds memory

I am trying to display an image from the app asset catalogue as an attachment in the push notification. I have used these articles and questions as source of inspiration: UNNotificationAttachment with UIImage or Remote…
Banana
  • 4,010
  • 9
  • 33
  • 49
0
votes
0 answers

Is there a way to get current location when i receive a notification?

Is there a way in iOS to get my current location when I receive a push notification? Like, triggering it when o receive a oneSignal push and stuff... So what I already tried: a CLLocationManager inside the OneSignal Notification Service the…
0
votes
1 answer

How to delete files in iOS Notification Service Extension?

I have a UNNotificationServiceExtension that downloads videos and images to the Documents directory for use by classes that adopt UNNotificationContentExtension. I want to delete the media files that are no longer being used by any notifications. I…
Nick
  • 11
  • 1
  • 4
0
votes
2 answers

Modify 'sound' attribute in Push Notification Payload in UNNotificationService Extension

I am using a UNNotificationService extension to update the Payload content of a received Push Notification. I'm able to change the displayed alert text and the updated text is correctly displayed. However changing "sound":"default" =>…
0
votes
1 answer

iOS push notification banner clear action button

i want to do something when user clear notification from home screen is it possible to get trigger when user tap on clear button on push notification banner, i ended up with adding custom button on view but thats not feasible. image is attached i…
junaid
  • 193
  • 1
  • 16
0
votes
2 answers

What is the file size limit in temporary directory in iOS?

I am trying to save an image of size 7.9MB downloaded from here. But at line 'try data.write...' the extension crashes and I get this in console. kernel EXC_RESOURCE -> Notification Extension[3137] exceeded mem limit: ActiveHard 12 MB…
0
votes
1 answer

Notification Service extension doesn't run on app install

I have successfully implemented push notifications for my app. I have also activated Notification service extension to suit my needs. The problem arises when I uninstall the app and run the app from Xcode again the service extension doesn't work. It…
0
votes
1 answer

Can we avoid displaying push notification

There is a scenario where I need to check if a user should receive push notification based on his location. I am aware that UNNotificationServiceExtension helps us intercept the notification and contributes in building push content. But is it…
Nitish
  • 13,845
  • 28
  • 135
  • 263
0
votes
2 answers

Rich push notification not working with FCM in IOS

I've added UNNotificationServiceExtension and UNNotificationContentExtension in my project for rich push notification. Please refer the code below which i've added for the same. Code: #import "NotificationService.h" @interface NotificationService…
0
votes
0 answers

Ignore SIGPIPE in Notification Service Extension Objective C

I have an messenger app with a Notification Service Extension for handling notifications and runs an AFHTTPSessionManager service. When I receive the first notification I get a SIGPIPE error and the extension crashes and I lose all the notifications…
-1
votes
1 answer

iOS: How to display a banner notification with a dark theme

I want to display a banner notification with a dark background and light text. iOS naturally does this if the phone is using dark mode. However, in light mode, when I use WhatsApp, I noticed banners have a dark theme as long as they are displayed…
1 2 3 4 5
6