Questions tagged [unusernotification]

28 questions
5
votes
1 answer

Why are notifications not removed with removeDeliveredNotifications?

Up until recently (I believe prior to iOS 12 release), removing remote push notifications from the Notification Center worked as expected using removeDeliveredNotifications. Suddenly, without any code change in the Notification Service Extension,…
4
votes
1 answer

Using the New UNUserNotification API in a Standalone Objective-C Program

I'm trying to throw notifications from a standalone Objective-C file. The NSUserNotification API will be deprecated after OSX 11, so I'm looking to switch to the newer UNUserNotification interface. Unfortunately, I'm not able to find much on the…
4
votes
1 answer

iOS 15 - Notification sounds are not playing for foreground notifications

What is the right way to play a tone associated with notification in iOS 15 without displaying banner or list? When handling notifications in foreground, both local and push, notification sounds are not playing if UNNotificationPresentationOptions…
return0
  • 93
  • 11
4
votes
3 answers

User notification are restricted to a limit in iOS app how to send unlimited for alarm app?

I am working on an alarm app project(Click for GitHub link) this code is working fine but the problem is notifications are limited to approximately 64 at the time so I am unable to send continues notification until the user responds to the…
Varun Naharia
  • 5,318
  • 10
  • 50
  • 84
3
votes
1 answer

Ios UNUserNotification Content Attachement (Image) resize/hide on notification expansion (Long click)

I have an app which shows local notification with content attachment as below image: Now when i click to show the notification actions button, the image gets enlarged and thus my image gets blurred. I tried to find the ways to show the action…
3
votes
1 answer

Can UNUserNotificationCenter.current().requestAuthorization() be called more than once?

Can UNUserNotificationCenter.current().requestAuthorization() be called more than once? Can I invoke upon every application launch? Can I invoke it again after the user has granted notification permissions? If not, why not?
2
votes
1 answer

What's the Difference Between NSUserNotification and UNUserNotification in macOS?

I have the following lines of code to post a notification by clicking on the Test button. import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDelegate { func userNotificationCenter(_…
El Tomato
  • 6,479
  • 6
  • 46
  • 75
2
votes
1 answer

Unable to see the MyAppNotificationSettings option in Settings Application

UNUserNotificationCenter *notificaitnCenter = [UNUserNotificationCenter currentNotificationCenter]; [notificaitnCenter requestAuthorizationWithOptions:UNAuthorizationOptionBadge | UNAuthorizationOptionAlert | UNAuthorizationOptionSound |…
2
votes
2 answers

Actionable notifications not showing actions Swift 4

I'm learning the new notification system but I'm having trouble with actions. The notification works, but I do't get an action with it. I'm following a tutorial on https://www.appcoda.com/ios10-user-notifications-guide/ but I don't seem to get…
Vincenzo
  • 5,304
  • 5
  • 38
  • 96
2
votes
0 answers

How to set fromDate in UNTimeIntervalNotificationTrigger

I need to fire a notification at every 48 hours from a specific date. I can schedule it using UNTimeIntervalNotificationTrigger as - let trigger : UNTimeIntervalNotificationTrigger = UNTimeIntervalNotificationTrigger.init(timeInterval:…
Pooja Gupta
  • 785
  • 10
  • 22
1
vote
0 answers

How to make sure scheduled notification works with respect to timezone and daylight savings

As far as I understand , when we pass date time components as a trigger for notification. It automatically handles Change in timezone Change in daylight savings Leap year things But I know in older UILocalnotification we've to do the below to get…
Amogam
  • 321
  • 5
  • 20
1
vote
1 answer

Reschedule notification on notification action doesn't work Swift

I'm trying to reschedule a notification when user tap on wait notification action. When triggerNotification() gets called the first time Dateis provided by a Date Picker, but when it's called by a response gets the date from a time interval. Inside…
Vincenzo
  • 5,304
  • 5
  • 38
  • 96
1
vote
1 answer

Need explanation about requesting permission for notifications in iOS

Info about "authorization" Info about "requesting permission" The problem is they both needed in the same code but they are split into 2 separate articles. So it is unclear how to deal with them simultaneously and what is the difference between them…
1
vote
1 answer

How to get specific view controller on click of local Notification?..I tried all possible way to achieve but couldn't

I am having two view controllers on first controller having button , on click of which a local notification triggered, but I want to open second view controller on click of local notification. Has gone through all the related post but couldn't get…
K.K
  • 79
  • 2
  • 8
1
vote
2 answers

Can I use UILocalNotifications and UNUserNotifications?

I have an iOS app that includes user 'alarms' - sent to user when the the app is not in foreground. I am using UNUserNotifications and all is working well in iOS 10 and iOS 11 testing. I would also like to reach users who are still using iOS 8 and…
jday
  • 149
  • 3
  • 10
1
2