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

Launch app from local notification in iOS 10

I am trying to implement app launch (from inactive state) with an action from a local notification in iOS 10. I have followed Launch a local notification at a specific time in iOS and the app launches fine in response to the local notification. But…
Mick
  • 811
  • 14
  • 31
3
votes
0 answers

userNotificationCenter didReceiveNotificationResponse not called

I have declared my class to conform to UNUserNotificationCenterDelegate as well, I am declaring said class as the current UNNotificationCenter delegate in didFinishLaunchingWithOptions. However, no matter what I do, I am unable to receive a callback…
Thomas Oo
  • 379
  • 4
  • 14
3
votes
0 answers

How to post a local notification without sound in iOS 10?

UNMutableNotificationContent *content = [[UNMutableNotificationContent alloc] init]; content.sound = [UNNotificationSound defaultSound]; NSDateComponents *components = [[NSDateComponents alloc] init]; components.hour = 0; …
3
votes
1 answer

custom sound not working in unnotificationrequest ios 10 objC

custom sound not working in unnotificationrequest - iOS 10 I tried : [UNNotificationSound soundNamed:@"Alarm.mp3"] or [UNNotificationSound soundNamed:@"Alarm"] and the file is exist in bundle or Library/Sounds but always played default sound when…
Mohammad
  • 141
  • 1
  • 7
2
votes
1 answer

How can I get UNNotificationRequest array using for loop to populate SwiftUI List view?

I want to simply get the list of local notifications that are scheduled and populate a SwiftUI List using forEach. I believe it should work like I have done below, but the array is always empty as it seems to be used before the for loop is finished.…
Peter Ruppert
  • 1,067
  • 9
  • 24
2
votes
0 answers

UserNotification repeat every minute starting at date in the future

Using Swift5.2, iOS13.4, I try to set a local Notification that fires on a particular date and repeats every minute endlessly. I tried using Calendar.components and UserNotification in the following way: // create alarmDate in the future let…
iKK
  • 6,394
  • 10
  • 58
  • 131
2
votes
1 answer

How to enable push notification from app settings in iOS Swift 5?

In my application I have in app settings for enabling/disabling push notifications. I ran into a case in which if user Don't allow notifications when the application launches and then enables it with Settings in the Application then authorization…
2
votes
0 answers

UNTimeIntervalNotificationTrigger

Scenario is: I need to fire local notifications for an array of objects, each after a fixed interval of time in seconds here is the code which works only for 1 interval if i provided a fix number of seconds func DeliverMyMessage(_ dict: EnFact, _…
user2672187
  • 21
  • 1
  • 3
2
votes
1 answer

Update UILabel text value , when changing the user permission for notification in application setting page?

In my scenario, User will get an alert for receiving Notification in application. If the user clicks on "Don't Allow" UILabel is updated with "Not enabled". If the user wants to change the notification,User will be navigated to application setting…
muthukumaresh
  • 103
  • 1
  • 8
2
votes
3 answers

UNNotificationAttachment set image URL to Caches directory

I have Image cache mechanism in my app. I also need to show local notifications with images. I have a problem. When I try to set UNNotificationAttachment with an image, I get an image from my cache or, if an image doesn't exist, I download it and…
2
votes
1 answer

Location based notifications with different radius CLCircularRegion triggered at once

I would like to show user 3 different local notifications as he is coming to exact point. So I set 3 circular regions with same center but different radiuses (500m, 1km, 2km). When I am closing to this point I get all 3 notifications at once. Why is…
2
votes
0 answers

iOS 11 new notification center removes all delivered notifications after user make any action with one of them

I have an issue on iOS 11. All delivered notification automatically removing from notification tray after I select any action for one of them. This happens before my code start handling action. In iOS 10 everything is ok, all delivered notifications…
2
votes
0 answers

iOS 11.2 delivered notifications from notification centre don't remove

I have been using removeDeliveredNotificationsWithIdentifiers: and removePendingNotificationRequestsWithIdentifiers methods to remove local notification from the notification centre. It has been working perfectly until I updated my device to iOS…
2
votes
2 answers

Trigger UILocalNotification for every 14 days (fortnightly) Swift

The question has been already answered on SO. Here is the reference: iOS Notification Trigger: fortnightly and/or quarterly But what I have tried is so far: var fortnightPart1 = DateComponents() fortnightPart1.weekday =…
2
votes
1 answer

How to get the remaining time of pending UNNotificationRequest?

So far, after adding a UNNotificationRequest to the UNUserNotificationCenter that contains UNTimeIntervalNotificationTrigger (Here is the code that I implemented): let center = UNUserNotificationCenter.current() center.requestAuthorization(options:…
Ahmad F
  • 30,560
  • 17
  • 97
  • 143