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

Repeating Local Notifications at specific intervals

Is it possible to have a notification repeat at specific intervals? For example, Remind me to do something on Monday to Friday (from 9:00am to 6:00pm)?
lpy
  • 25
  • 5
0
votes
0 answers

How to create a repeating daily local user notification with dynamic properties

Here is the scenario I am trying to solve: In my app the user has the ability to schedule daily, weekly or monthly repeating notifications. The notification content body and badge number include a dynamic Int property who's value might change daily…
0
votes
0 answers

How to call a function when the app is inactive (e.g. playing music in background)?

I am making a music-streaming alarm clock. Music streams for the duration selected by the user, including in the background, and at the end of the duration a custom alarm sound is played in addition to a local notification. In short (1) set timer…
0
votes
1 answer

How to set alerts in UNNotificationCenter some days before?

How I can make local notification be triggered before some days? For example, I create local notifications from dateComponents: var dateComponents = Calendar.current.dateComponents([.month, .day], from: birthDate) dateComponents.hour = 10 …
ucelme
  • 97
  • 1
  • 13
0
votes
1 answer

can UNUserNotificationCenter add multiple requests?

I can add one request. But when i tried to ad two, only the latest is fired. The first just doesn't appear. Here is my method : var triggerDailyEnd = DateComponents() triggerDailyEnd.hour = hour …
0
votes
1 answer

How would I set up the view when the user taps the View button on a local notification in iOS?

I would like to set up my local notification on my iOS app so that when the user swipes left and then taps on View, the message on the notification shows in the view that appears. I want to do this because if the message is long, it is cut off so…
0
votes
1 answer

willPresent and didReceive Notification delegate not get called when user in foreground and app is installed fresh

I have implemented FirebaseCloudMessaging, getting notifications when the app is in Background but when I install the fresh app willPresent and didReceive Notification delegate not get called after 30 to 35 minute it will start calling. It happens…
0
votes
1 answer

UserNotifications displays past time (ex: 2 minutes ago)

I am fetching some data in the background on a time interval. so the data that comes may be minutes old. I want to display the real time in a local "UserNotifications" of the data (ex: 2 minutes ago) not "Now". I wonder if it's possible. Thank you
zizoodiesel
  • 197
  • 1
  • 13
0
votes
1 answer

watchOS Notifications Delivering Quietly

Problem: Notifications created on the Apple Watch are only intermittently alerting the user to their existence. When swiping down from the top of the screen, Notification Center shows that the notification was received. Why are we not getting the…
AVS
  • 373
  • 3
  • 19
0
votes
2 answers

Is there a way to create actionable notifications on the Apple Watch without creating an actual watch app?

I am trying to get an actionable notification for iOS app and watch app the actionable notification works on iOS and it shows on the watch as well when phone is locked. My issue is that in the watch it doesn't show the actions for the notification.…
Ofiucus
  • 3
  • 4
0
votes
1 answer

MacOS Mojave UNNotificationAttachment thumbnail not showing up in notifications

This is the (simplified) code I am trying to run. The image file exists and the app does not crash. What happens in that the image is deleted from the location as mentioned in the documentation for UserNotifications. However, the image thumbnail…
Crazy-Fool
  • 96
  • 1
  • 13
0
votes
2 answers

Switching to Xcode 10 causes `UserNotifications.framekwor dyld: Library not loaded crash` for iOS9

We have an app that is working properly with the UserNotification.framework being linked as required framework in Xcode 9. Everything works smooth here. Now we are switching to Xcode 10. But there linking this framework as required leads to dyld:…
Martin Mlostek
  • 2,755
  • 1
  • 28
  • 57
0
votes
1 answer

Swift Notification based on BLE value when app it out of focus

I'm working on an iPhone app to control some custom BLE hardware. I am able to talk to my device and generate all required controls, but my problem now comes with setting up UserNotifications. Part of the functionality of this device is to alert…
0
votes
0 answers

Couldn't read the contents of a file from UNNotificationServiceExtension class in swift

I have a UNNotificationServiceExtension class and from didReceive delegate method I want to read user information from .dat file. var value : String? = nil //filePath has valid path with filename if(filepath != nil){ value = try?…
Sanjay
  • 1
  • 1
0
votes
1 answer

App running in the background send local notifications

How can i send Local Notifications while app is running in the background? in Swift 4. My app continuously use an Json file and I want the app to continue running so that it sends the user a Local Notification. I want a if label = label2 in…
Holofacts
  • 1
  • 4