Questions tagged [unusernotificationcenter]

Manages the notification-related activities for your app or app extension. Local notifications and push notifications are both ways for an iOS application that isn’t running in the foreground to let its users know it has something for them. Use this tag for the queries related to the new Rich Notifications introduced in Swift 3.

Use the shared UNUserNotificationCenter object to schedule notifications and manage notification-related behaviors in your app or app extension. The shared user notification center object supports both local or remote notifications in varying capacities. Use this object to perform the following types of tasks:

  • Request authorization for displaying alerts, playing sounds, or badging the app’s icon in response to local or remote notifications. (Authorization is required for all user interactions.)

  • Declare the notification types that your app supports and the custom actions (if any) that the user may perform when those notifications
    are delivered.

  • Schedule the delivery of notifications from your app.

  • Manage app-specific notifications displayed in Notification Center.

  • Get the notification-related settings for your app.

The notifications that you schedule directly from your app are known as local notifications because your app creates them locally on the user’s device. By contrast, remote notifications are created by your own server and delivered to the user’s device via the Apple Push Notification Service (APNS).

370 questions
0
votes
1 answer

How to implement notification handler in WatchOS 2.0?

In handleActionWithIdentifier:forLocalNotification:'s docs, this method is declared that deprecated from WatchOS 2.0 I looked for App Programming Guide for watchOS, at Notification section, they suggest using UNUserNotificationCenter of…
0
votes
2 answers

Present a specific ViewController from the TabBarController

I want to open a specific ViewController from the TabBarController whenever a local notification is fired and their custom action is performed. I have used following line of code: func userNotificationCenter(_ center: UNUserNotificationCenter,…
0
votes
1 answer

UNCalendarNotificationTrigger - Execute after the hour

Good Morning Sirs I know using UNCalendarNotificationTrigger this way: var dateComponents = DateComponents() dateComponents.hour = 10 dateComponents.minute = 30 let trigger = UNCalendarNotificationTrigger(dateMatching: dateComponents, repeats:…
0
votes
0 answers

iOS 10 userNotificationCenter didReceiveNotificationResponse not triggered when app is in background or killed

The callbacks in UNUserNotificationDelegate are not called at all when the application is in background until user tapped the notification. every thing is working fine like remote to device notification "willPresentNotification" etc but…
0
votes
2 answers

iOS 10 Notification trigger and repeat every minute

I want to trigger the notification in 2 minutes time from now and also want to repeat it in every minute. The problem with the following code is it will repeat in every minute but it will start immediately not in 2 minutes. Appreciate any…
Viraj
  • 209
  • 1
  • 2
  • 11
0
votes
1 answer

swift create user notification

I want to create a userNotification that'll be shown in Notification Center while the app is running. Clicking the notification will terminate the app. Which trigger needs to be used? How do I achieve this functionality?
Aryan Sharma
  • 625
  • 2
  • 9
  • 24
0
votes
2 answers

UNUserNotificationCenter don't work when app is killed

I just did change for my notification for iOs 10 and others: if #available(iOS 10.0, *) { let center = UNUserNotificationCenter.current() center.requestAuthorization(options: [.alert, .sound]) { (granted, error) in let content =…
Ben
  • 761
  • 1
  • 12
  • 35
0
votes
1 answer

Local notification won't send after incrementing time by one day

I'm creating an app that delivers daily local notifications at a time specified by the user via the app interface. During testing, I schedule 20 daily local notifications to cover 20 days. On the last day, it's up to the user to tap the button to…
0
votes
1 answer

Scheduling multiple Local Notifications in iOS 10 is not working

I am using UNUsernotification for iOS 10 and Xcode 8 Beta 2 I wrote below code for Local Notification in iOS device: -(void) localNotificationForiOS10:(NSDate *) _reminderDate{ NSLog(@"_reminderDate %@",_reminderDate); NSCalendar…
Anil Gupta
  • 1,155
  • 1
  • 19
  • 26
0
votes
1 answer

iOS UserNotifications LocationTrigger entry vs. exit

Is it possible with the new UserNotifications in iOS 10 to discern the difference of entering or exiting a region so that a different notification can be sent? I have been doing this with CLLocationManager which has didEnter, and didExit delegate…
jimijon
  • 2,046
  • 1
  • 20
  • 39
0
votes
0 answers

How to add multiple Local Notification in iOS 10?

How to scheduled multiple local notification. In iOS 10 UILocalNotification is changed to UNUserNotificationCenter. But I am not getting how to add multiple notification according to date/time. And how can I handle that notification on clicking on…
Soumya Ranjan
  • 4,817
  • 2
  • 26
  • 51
0
votes
1 answer

Wait for async code to finish Swift

I've been working on one of my project where I allow users to schedule multiple notifications at their desired time. I'm using the new UserNotifications in iOS 10. In order for all notifications to be scheduled properly each notification needs to…
0
votes
1 answer

Schedule and handle local notifications in iOS 10

I've been working on one of my project where I allow users to schedule multiple notifications at their desired time. iOS 10 gave us the ability to use a DateComponents as the fire date for our notification but I'm kind of lost as to how I'm supposed…
0
votes
1 answer

Interactive actions in notification view not visible on iOS 10 ( xcode 8)

I am trying to implement Notification Framework and does anyone know why I am not getting two action buttons in interactive notification? When I swipe to the left I only have 'Clear' button visible Thanks in advance …
-1
votes
1 answer

iOS - Repeat notification every 72 hours

I want to get notification when app is terminated to notify users that you need to keep app running to get app updates. I also want to repeat notifications every 72 hours if app is not running. For now, I have implemented local notification however,…
1 2 3
24
25