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
1
vote
0 answers

How to set UNLocalNotification between two dates Swift

I am working on a medicine reminder app. The user will input two dates and I need to schedule local notifications between those two dates. I can't find how to specify the starting and the ending date in the UNNotificationRequest. I have tried this: …
1
vote
1 answer

IOS 10+ repeat notification every specified Date

I'am trying to schedule a notification every specified date on each year for example every 1/6/yyyy and 15/6/yyyy i've done this code but it does not work var dateComponents = DateComponents() dateComponents.hour = 07 …
1
vote
2 answers

Not Getting push notification in Notification tray (at top) while App in foreground iOS

I tried lot to get modified notification while app is foreground .... By Creating Notification Service Extensions In Background and killed success to modified but in foreground only Getting Original Payload in alert body not in notification . HERE…
SANTOSH
  • 183
  • 1
  • 15
1
vote
1 answer

UNUserNotification never appear when scheduled for later date

Notifications are shown when I schedule for a near date in the future, like 1 hour later, but they never show on my real data, when I schedule for tomorrow or for later tonight. Any ideas on why this is happening? I double checked the…
Paulo Cesar
  • 2,250
  • 1
  • 25
  • 35
1
vote
1 answer

How do I check my applicationIconBadgeNumber value?

I want my redDot to display when I have some value in badge, i.e UIApplication.shared.applicationIconBadgeNumber this is the code I wrote, but doesnt seem to work : import UserNotifications @IBOutlet weak var redDot: UIImageView! override func…
S.Verma
  • 199
  • 2
  • 14
1
vote
1 answer

Cannot attach media in remote notification using notification service extension in ios 10

I can modify the content of remote notification using "func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void)" of notification service extension. But could'nt download images…
Mitha
  • 21
  • 3
1
vote
0 answers

Local notification UNTimeIntervalNotificationTrigger triggerWithTimeInterval fires for 20 minutes then stops

I am using local notifications in my app to alert urgent messages to the user. What happens is the user receives a push notification, then a local notification is created and fired 60 seconds later with a time interval of 60 seconds. This works…
0
votes
1 answer

How can i get notification response value in didReceiveRemoteNotification?

I reached UINotification value on didReceive, willPresent and getDeliverredNotifications functions. But i can't reach notification value in didReceiveRemoteNotification. I want to reach notification, because notification value has got identifier and…
0
votes
0 answers

Swift Notifications for iOS - Setting a Timeframe

When a user sets up a notification for an item, they are asked for a timeframe in which they wish the notifications to trigger. For example, they want a repeating notification every 2 hours between 8am-8pm. I know that I can run a for loop and setup…
0
votes
1 answer

How can I access the title of UNNotificationContent?

func CalendarTriggeredNotification(givenDate: Date, roomName: String, itemName: String) { let content = UNMutableNotificationContent() content.title = "Freshness Check." content.subtitle = "Room: \(roomName). Check on \(itemName)" …
user7894007
0
votes
1 answer

Swift UNNotificationRequest identifier of action button tapped local notification

Is it possible to get the UNNotificationRequest identifier of a tapped local notification button or any other information about the notification? Maybe via a delegate? Thankyou
jat
  • 183
  • 3
  • 14
0
votes
1 answer

Start and End date in UNNotificationRequest

How to schedule a local notification request with the future start date(with Time) and end date(with Time). is it possible as I am unable to see any variable in the framework
Avinash Tag
  • 162
  • 2
  • 12
0
votes
0 answers

How to fix repeated duplicate notifications problem in macOS app

I have created a UNNotificationRequest with following code in a macOS app let content = UNMutableNotificationContent() content.title = "Welcome" content.body = "body" content.sound = UNNotificationSound.default …
0
votes
1 answer

iOS - Scheduling a repeating notification with different text

I have an app where the user needs to complete a task every day. If the user does not complete a task, he/she gets a reminder at 8am the next day with a phrase prompting to complete the task. We would like to send a phrase every morning but we don't…
0
votes
1 answer

Retrieve UNNotificationRequest Sound Name from Request

I set up a notification with a custom sound like so: var soundNames = ["Default", "Alert1", "Alert2", "Alert3", "Alert4", "Alert5", "Alert6", "Alert7", "Alert8", "Alert9", "Alert10"] func addNotification(title: String, timeInt: TimeInterval, image:…
Peter Ruppert
  • 1,067
  • 9
  • 24