Questions tagged [unnotificationrequest]

A UNNotificationRequest is a new Cocoa Touch notification object introduced with iOS 10.

UNNotificationRequest is a replacement for UILocalNotification. Use this tag only for questions related to UNNotificationRequest from the UserNotifications module.

UNNotificationRequest class reference`

112 questions
5
votes
4 answers

Firebase listener when app is in the background

I have a Firebase childAdded event listener for the notifications table in my app that I would like to trigger push notifications when the app is in the background. Here is the listener: @objc func observeNotificationsChildAddedBackground() { …
5
votes
1 answer

iOS 10 How to set UNotificationContent threadIdentifier for remote notification

TL;DR: What key needs to be set in the APNs notification payload JSON to correspond to the threadIdentifier property of the UNNotificationContent object? e.g. the "category" key corresponds to the categoryIdentifier property. iOS 10 introduces the…
Sam
  • 5,892
  • 1
  • 25
  • 27
5
votes
4 answers

Display custom UI with UNNotificationContentExtension for local notifications

I'm trying to use the new UNNotificationContentExtension to display a custom user interface for local notifications but only the default notification alert is shown. I created the extension with the Xcode template and specified the…
mhaddl
  • 885
  • 1
  • 9
  • 18
4
votes
1 answer

What will happen to Scheduled notifications after the device Reboots?

I was trying to find an exact answer for the question: "what will happen to my scheduled notifications after the device is rebooted?". I've used the UNUserNotificationCenter to schedule all the notifications and they will be triggered repeatedly on…
4
votes
1 answer

Swift UNUserNotification does not trigger sound

This is my code for UNUserNotification func scheduleNotification() { UNUserNotificationCenter.current().getNotificationSettings { (notificationSettings) in switch notificationSettings.authorizationStatus { case…
r4id4
  • 5,877
  • 8
  • 46
  • 76
4
votes
0 answers

Local Notification on watchOS 3 not showed

I’ve a problem with the UNNotification on watchOS 3 ! In watchOS 2 and iOS 9 to schedule a local notification I use WatchConnectivity From watch I send a message to iPhone and the iPhone schedule the local notification When the notification arrive…
4
votes
1 answer

Use of unresolved identifier: "UNMutableNotificationContent"

I have the following code: func sendLucidNotification() { let content = UNMutableNotificationContent() content.title = "10 Second Notification Demo" content.subtitle = "From MakeAppPie.com" content.body = "Notification after 10…
ZB-dev
  • 219
  • 3
  • 12
4
votes
5 answers

iOS 10 Notification Content Extension not loading

I have a bare-bones app to play with push notifications. I have the Notification Service Extension working. I can send a remote notification with an image URL and have it load. I can't seem to get Notification Content Extension working. I've gone…
4
votes
0 answers

How can I get the containing app when implementing a `UNNotificationServiceExtension`?

I have one extension target and many product targets, and I want that one extension target to be able to be shared among all of my product targets and still be able to identify the app that will receive the UNNotificationRequest. Is there a way to…
Hyperbole
  • 3,917
  • 4
  • 35
  • 54
4
votes
0 answers

Blurred / semi-transparent background in rich iOS10-notification's ViewController?

I'm working on advance notifications in iOS 10 for our app and have been asked by our designer, if I can do blurred/semi-transparent background for ViewController's part (like on the image below): As you can see - behind the kitten it's possible to…
Konstantin Loginov
  • 15,802
  • 5
  • 58
  • 95
3
votes
0 answers

Play sound at a specific time in background iOS

I have a muslim app that triggers local notifications with sounds for prayer times throughout the day. The sounds are limited to 30 seconds. I am searching for a workaround to play sound longer than that. I found out I can use AVAudioSession to play…
3
votes
1 answer

How to sort an array of UNNotificationRequests by nextTriggerDate

I have an array of UNNotificationRequest. I want to sort them by nextTriggerDate. As far as I understand it, I would sort the array using array.sorted(by:predicate) let sortedNotifications = notificationRequests.sorted(by: {…
3
votes
0 answers

use systemSound from SystemSoundID for UNNotificationSound

I am trying to add a sound to my UNNotification. Instead of my own custom sound or the default sound, I would like to use one of the iOS SystemSounds in AVFoundation. I can get the sound by: import AVFoundation ... let systemSoundID: SystemSoundID…
alionthego
  • 8,508
  • 9
  • 52
  • 125
3
votes
1 answer

Use UNNotificationRequest (UserNotificationFramework) for data only local notification on iOS

I would like to use the UserNotificationFramework on iOS 10 to send myself data only notifications -- i.e., with no user facing text or sound. Basically to use it as a persistent timer to be able to trigger the app, if running when it fires, to…
chadbag
  • 1,837
  • 2
  • 20
  • 34
3
votes
0 answers

ios 10 swift 3 add more than 64 local notifications does not keep soonest

As we know limit of local notifications in ios 10 equals to 64. However app like water reminder requires a lot of notification per day and user can choose unique plan for each of the day. The problem is: lets say I have already stored 64…