Questions tagged [usernotifications]

iOS 10, macOS 10.14, Mac Catalyst 13, tvOS 10 and watchOS 3 UserNotifications framework

The UserNotifications framework (UserNotifications.framework) supports the delivery and handling of local and remote notifications starting in iOS 10, macOS 10.14, Mac Catalyst 13, tvOS 10 and watchOS 3. Class names start with "UN". See https://developer.apple.com/reference/usernotifications.

182 questions
0
votes
0 answers

How to set an alarm for 2 week days with UserNotifications API

I am trying to simulate the stock alarm app usage with the UserNotifications API but I am having hard time doing it. For a single specific weekday (monday in this case) its all good. NSDateComponents *components = [NSDateComponents…
Bartu
  • 2,189
  • 2
  • 26
  • 50
0
votes
0 answers

Error: Cannot assign to property: 'badge' is a get-only property

I've tried to create a badge updater for local notifications using the UserNotifications.framework. And here's my code func badgeUpdate() { let center = UNUserNotificationCenter.current() center.getPendingNotificationRequests { (requests)…
Mannopson
  • 2,634
  • 1
  • 16
  • 32
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
3 answers

How to add snooze effect once a notification is delivered in ios 10

I am implementing UserNotification in my app. When the notification gets fired it shows two action, in one i want to add snooze effect, it must snooze after 5 mins again. How to handle it ? thanks for all ! help if any one do have idea
kishan
  • 203
  • 1
  • 6
  • 15
0
votes
1 answer

Local Notifications After Device Restart

I start my app and schedule my local notifications. This is a simplified version of the code I'm using: let content = UNMutableNotificationContent() content.body = "Wild IBEACON appeared!" let region = CLBeaconRegion(proximityUUID: uuid, identifier:…
Mr.Yeah
  • 1,054
  • 2
  • 9
  • 21
0
votes
1 answer

Stop iOS local notifications at particular time

My app using User Notification framework to schedule local notifications every 30 minutes. I set a trigger var trigger = UNTimeIntervalNotificationTrigger.CreateTrigger(60 * 30, true); However, i would like to stop these notifications after…
User382
  • 864
  • 19
  • 42
0
votes
1 answer

Schedule notification to execute every day starting next week

My original problem: When a user is setting an alarm for 19:00, I would like to show a reminder at: 19:03 19:09 19:12 In case he did not interact with the notification. (The app should be able to run offline, so there is no way of using push…
0
votes
0 answers

iOS 10 UserNotifications: override default action

I'm trying to use the iOS 10 UserNotifications framework to do something very basic: open a specific ViewController when the default action is selected. I've been through a number of tutorials but they all focus on custom categories and actions, and…
Janus Varmarken
  • 2,306
  • 3
  • 20
  • 42
0
votes
1 answer

Example of how to use UNNotificationCenter with Local Notifications?

I am trying to implement local notifications on an app that I am building. Most of my code follows what is written In the documentation I will post my code below. My current problem is that the notifications never appear. The first time I loaded the…
Nate4436271
  • 860
  • 1
  • 10
  • 21
0
votes
1 answer

How to open a specific view controller from a custom notification action in WatchOS 3

I'm developing a WatchOS3 application in which the user receives local notifications with custom actions. The user has 2 custom actions that he can call on the notification, option 1 and option 2. After the user taps on either of the options, the…
0
votes
1 answer

How to receive iOS10 Remote UserNotification

{ "aps": { "alert" : { "title": "Daily Sales", "body": "Bed" }, "badge" : 1, "mutable-content": 1 }, "my-attachment" :…
Kurt1018
  • 83
  • 2
  • 5
-1
votes
1 answer

in Xcode how can i show local notification of both "foreground and background" mode?

my below code only sends local notifications when foreground. how can i show local notification of both "foreground and background" mode? can anyone provide a code ? thank you o.k @main struct ozApp: App { …
-1
votes
1 answer

How to make local notification repeat every day on the first of the month - swift

I'm wondering how I can make a local notification in swift repeat on the first of every month. So on the first of January, reminder. On the first of February, same reminder, and so on. Preferably using date components.
Evan C
  • 79
  • 6
-1
votes
1 answer

Cannot assign to property: 'actions' is a get-only property

I am making my first app and here is my biggest problem. I would like to make a notification in which i can add actions to it based of user input. I have made a category with no actions at first and then with a for loop I try to create actions and…
-1
votes
1 answer

Local Notification when date is set on a UIPickerView?

I want to set up a local notification when a user sets a date on a UIPicker. At the moment I have no code because I am not sure where to start.
1 2 3
12
13