Questions tagged [serviceextension]
14 questions
9
votes
4 answers
Notification service extension for Local notification
will system loads Notification service extension and calls its didReceive(_:withContentHandler:) for local notifications in iOS 10?
If yes how we can do that?

Vinu David Jose
- 2,569
- 1
- 21
- 38
8
votes
1 answer
UNNotificationServiceExtension fails to update notifications occasionally
I have a UNNotificationServiceExtension written in Swift. All it does:
Set notification title
Set notification body
Load image & call contentHandler ()
Here's a shorted version of what am I doing:
override func didReceive(_ request:…

Konstantin Loginov
- 15,802
- 5
- 58
- 95
7
votes
1 answer
How to save remote notification data into Core Data(Database) from NotificationServiceExtension
I have implemented NotificationServiceExtension in my target application, and it is working fine.
Created AppgroupID
lazy var persistentStoreCoordinator: NSPersistentStoreCoordinator? = {
var coordinator: NSPersistentStoreCoordinator? =…

Bucket
- 449
- 3
- 20
7
votes
6 answers
Notification Service Extension Not working
Notification is not being displayed when I send mutable-content:1 with push payload neither it hits the breakpoint inside the Notification service extension, although without mutable-content push is being displayed, also Notification content…

rahulk9
- 795
- 3
- 10
- 20
7
votes
1 answer
didReceiveNotificationRequest:withContentHandler - execution time limit?
UNNotificationServiceExtension has a method didReceiveNotificationRequest:withContentHandler to handle notification change.
It has a very ambiguous description, regarding timeout time:
That method has a limited amount of time to perform its task…

Konstantin Loginov
- 15,802
- 5
- 58
- 95
6
votes
1 answer
iOS: How to reach saved data of an app from inside its UNNotificationServiceExtension?
Is there any way to reach data saved in the Sandbox of an iOS app from inside its Notification-Service-Extension instance? I want to grab some data from a database before I pass on the contenhandler.
I tested from inside my
override func…

headkit
- 3,307
- 4
- 53
- 99
6
votes
1 answer
iOS 10 Service Extension Inconsistent
While there is a similarity to another question here:
iOS 10 don't call Notification Service Extension
I wish to provide a more concrete issue with concrete misbehavior. Consider the following push payload:
{
"service-alert":{
…

christopherdrum
- 1,513
- 9
- 25
2
votes
2 answers
ios NotificationService Extension is not called when screen is locked
I have a NotificationService Extension in my iOS app which I use to modify the text and download attachments.
This works fine as long as the screen is unlocked. The moment the screen is locked, the service extension is not invoked and the…

trshivku
- 41
- 3
2
votes
2 answers
Cannot modify or add or remove the userInfo of payload in notification service extension in iOS10
In the short period of notification service extension's
- (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler
I can modify the…

guhan0
- 666
- 6
- 19
1
vote
3 answers
How to run app with UNNotificationServiceExtension on pre iOS 10?
My app implements the new iOS 10 rich push NotificationService extension.
Everything works as expected on iOS 10, but I also want to support pre iOS 10 devices - of course not rich push, but just regular push. When lowering the deployment target in…

electronix384128
- 6,625
- 11
- 45
- 67
0
votes
0 answers
Multiple Managed Object Context in main app and extension
My app and its extension are using a sharing database through app group, and using different NSManagedObjectContext because extension cannot use NSManagedObjectContext from main app.
The problem is, when I change data in main app and call…

Tiến Nguyễn Hữu
- 131
- 1
- 12
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
…

mfaani
- 33,269
- 19
- 164
- 293
0
votes
1 answer
Invalid attachment file URL in UNNotificationServiceExtension
I've written a UNNotificationServiceExtension where I'm trying to download a file and attach it. Every time I run I get an exception saying
Invalid attachment file URL.
I can't for the life of me figure out why this is failing.
override func…

Gargoyle
- 9,590
- 16
- 80
- 145
-2
votes
1 answer
Can I perform a task in Main iOS app from the app Extension?
I have an app extension for Sharing (Share Extension) and when a user selects my app to share an image, my app will send that image to a server.
The problem is that the server requires an authenticated identity (AWS Cognito) to send the object to…

alionthego
- 8,508
- 9
- 52
- 125