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

How to get a Xamarin iOS notification service extension working?

I'm trying to add a notification service extension to my Xamarin iOS so that I can receive silent notifications. I'm using OneSignal and have followed their instructions and set up everything that I think is required: App bundle id =…
0
votes
0 answers

How can I check if my SwiftUI application is in the background from a NotificationService Extension?

I am using a notification service extension in my app to handle push notifications when the app is in the background: override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) ->…
alionthego
  • 8,508
  • 9
  • 52
  • 125
0
votes
0 answers

Xamarin - iOS: Why do I not receive push notifications with app in foreground through NotificationServiceExtension?

Push notifications that goes through the extension are always received when app is killed, I can notice that on the device e through the logs printed by the extension. When app is in foreground, nothing happens, neither I see logs in the extension…
0
votes
1 answer

UNNotificationServiceExtension didRecieve not called

I have added mutable-content: 1 in apns payload. Checked the deployment target as well. Still I am not getting call in didRecieve method. I am using XCode 12 NOTE: UNNotificationContentExtension is working but not service
Cintu
  • 913
  • 2
  • 16
  • 32
0
votes
1 answer

How to persist a variables value in Notification Service Extension on subsequent push notification

Is there a way somehow we can persist a variable's value in NSE. Suppose i got a Bool variable i set it's value to true upon arrival of push in NSE and show the notification upon my work, now i got another push notification after some time is there…
0
votes
2 answers

Notification Service Extension - make URL request when app is not running

We implemented Notification Service Extension in our app. Our goal is to download some data from our server and modify the notification content in didReceive(_:withContentHandler:). It's working fine when the app is running in the background, or has…
0
votes
1 answer

EXC_BREAKPOINT crash in iOS Extension when debug with some breakpoint

When I debug the code in iOS Extension. I face some crash with EXC_BREAKPOINT What did I do? Run my APP with Xcode 11.5. Start debugging for extension: Debug -> Attach to Process by PID or name -> Input my Extension name and click Attach…
0
votes
0 answers

iOS - How to remove specific notification of terminated app from server?

I want to remove a notification of a terminated app from server; I know about UNUserNotificationCenter.current().removeDeliveredNotifications(withIdentifiers: ) but I need to call it when app is terminated. We all know that silent notifications are…
0
votes
1 answer

Can i inherit the Version and build from main app to my Extension app

since i have an extension app inside my main App and my main app update the version and build according to the commit. I am wondering if is possible to update the extension version and build according to my main app automatically.
Steven
  • 63
  • 5
0
votes
1 answer

Logging from Notification Service Extension

So currently I'm doing this: override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) { logger = AnalyticsManager.shared self.contentHandler = contentHandler …
0
votes
2 answers

Can handler not show remote notification when iOS app is killed?

My requirement is prevent remote notification from being display. I can handler this if app is in foreground or background in following methods: func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable:…
0
votes
1 answer

Push Notification Service Extension in iOS is not getting executed

So i have created a iOS Notification Service Extension in Xamarin forms according to the guide mentioned here [https://learn.microsoft.com/en-us/xamarin/ios/platform/user-notifications/enhanced-user-notifications?tabs=windows][1] This is my…
0
votes
0 answers

NotificationService Extension returns different locale than App target

I'm trying to get my current locale in the app and in the NotificationService extension. The code looks like this: let locale = Locale.current.identifier In the app target the locale is de_DE and in the NotificationService extension it evaluates to…
Nico S.
  • 3,056
  • 1
  • 30
  • 64
0
votes
1 answer

Notification service extension not come to device with api.sandbox.push.apple.com

I have an issue with Notification Service Extension on iOS 13. This issue is not always happen. When I push a notification with mutable-content = 1, on development apple server ( api.sandbox.push.apple.com:443), Apple return success on my server,…
0
votes
1 answer

Play Streaming URL in NotificationService in ios swift

I have played video in notification service extension by saving in the disk. Now I want to play streaming URL in notification service extension as an attachment. I have tried directly passing URL as an attachment, but it returns nil in the variable…
Ravi B
  • 1,574
  • 2
  • 14
  • 31