unnotificationtrigger

Repeating local notification removes previous pending local notifications

白昼怎懂夜的黑 提交于 2019-12-25 02:17:03
问题 I want to send local notification after every 30 minutes. I have implemented repeating local notification but it removes the preceding local notifications. The scenario is as explained : My client wants to get night alerts. He wants that when he wakes up in the morning he can check all the notification alerts at once. Here is the code: func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point

Always trigger a notification by matching the current time to that in array in objective c ios

爱⌒轻易说出口 提交于 2019-12-11 15:50:11
问题 Hello guys I am new to objective c, I am trying to trigger a notification when the current time matches the time of an array named newarr i have added times in this array. I want the notifications should be triggered automatically based on the times added in array. Now I have made an if statement whenever the current time matches the time given an array the notification is being triggered. but the ap is working fine but the only one notification is being triggered. please help me to trigger

Trigger UILocalNotification for every 14 days (fortnightly) Swift

雨燕双飞 提交于 2019-12-08 03:17:15
问题 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 = Calendar.current.component(.day, from: Sdate) //(Day..here Sunday) fortnightPart1.weekdayOrdinal = 2 //= n == (nth Day in the month...here 2nd Sunday in every month month) fortnightPart1.hour = Calendar.current.component(.hour, from: Sdate) fortnightPart1.minute = Calendar

Trigger UILocalNotification for every 14 days (fortnightly) Swift

寵の児 提交于 2019-12-07 20:13:19
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 = Calendar.current.component(.day, from: Sdate) //(Day..here Sunday) fortnightPart1.weekdayOrdinal = 2 //= n == (nth Day in the month...here 2nd Sunday in every month month) fortnightPart1.hour = Calendar.current.component(.hour, from: Sdate) fortnightPart1.minute = Calendar.current.component(.minute, from: Sdate) fortnightPart1.second = Calendar.current.component(.second, from:

ios 10 swift 3 add more than 64 local notifications does not keep soonest

青春壹個敷衍的年華 提交于 2019-12-06 00:14:07
As we know limit of local notifications in ios 10 equals to 64. However app like water reminder requires a lot of notification per day and user can choose unique plan for each of the day. The problem is: lets say I have already stored 64 notifications (10 for monday, 8 for tuesday and etc., they are all scheduled as repeated weekly) <UNCalendarNotificationTrigger: 0x6000008292e0; dateComponents: <NSDateComponents: 0x600000352fe0> Hour: 1 Minute: 3 Second: 0 Weekday: 6, repeats: YES> (lldb) po trigger.nextTriggerDate() ▿ Optional<Date> ▿ some : 2017-06-01 22:03:00 +0000 -

Scheduling local notifications to repeat daily from tomorrow in Swift

六月ゝ 毕业季﹏ 提交于 2019-11-29 10:48:06
I'm trying to schedule a local notification to fire every day (i.e. repeats), at a specific time, but from tomorrow. i.e "Trigger a notifcation every day at 8pm, from tomorrow" I've been using this SO question as guidance, and I believe I am doing what it says but I am still getting a notification today when I run the following code (if I schedule the notification before 8pm for instance): func testDateNotification(){ let content = UNMutableNotificationContent() content.title = "Test" content.body = "This is a test" let tomorrow = Calendar.current.date(byAdding: .day, value: 1, to: Date()) let

Scheduling local notifications to repeat daily from tomorrow in Swift

喜你入骨 提交于 2019-11-28 04:07:08
问题 I'm trying to schedule a local notification to fire every day (i.e. repeats), at a specific time, but from tomorrow. i.e "Trigger a notifcation every day at 8pm, from tomorrow" I've been using this SO question as guidance, and I believe I am doing what it says but I am still getting a notification today when I run the following code (if I schedule the notification before 8pm for instance): func testDateNotification(){ let content = UNMutableNotificationContent() content.title = "Test" content

Trigger local notifications automatically daily on dynamic time given in arrays Objective c ios

南楼画角 提交于 2019-11-26 20:57:40
I have an array of hours hoursArray and array of minutes minutesArray and I am getting the current date from the system now I have the arrays who have the elements of the current month it means if there are 30 days in April there will be 30 hours/minutes in hoursArray/minutesArray which I have inserted in the arrays, and I am getting current date as an index of arrays. What I have done is that notifications triggers in current day but it does not trigger the next day until I use app daily because when I use app daily before the trigger time method will be called when I turn to background mode

Trigger local notifications automatically daily on dynamic time given in arrays Objective c ios

陌路散爱 提交于 2019-11-26 07:47:57
问题 I have an array of hours hoursArray and array of minutes minutesArray and I am getting the current date from the system now I have the arrays who have the elements of the current month it means if there are 30 days in April there will be 30 hours/minutes in hoursArray/minutesArray which I have inserted in the arrays, and I am getting current date as an index of arrays. What I have done is that notifications triggers in current day but it does not trigger the next day until I use app daily