How to set Local Notification repeat interval to custom time interval?
Got the answer, it is as straight as it gets.
You cannot create custom repeat intervals.
You have to use on NSCalendarUnit's in-built Unit Time Intervals.
I tried all the above solutions and even tried other stuffs, but neither of them worked.
I have invested ample time in finding out that there is no way we can get it to work for custom time intervals.
UILocalNotification Repeat Interval for Custom Alarm (sun, mon, tue, wed, thu, fri, sat)
You cannot set custom repeat intervals with UILocalNotification. This has been asked before (see below) but only limited options are provided. The repeatInterval parameter is an enum type and it limited to specific values.
You cannot multiply those enumerations and get multiples of those intervals. You cannot have more than 64 local notifications set in your app. You cannot reschedule a notification once it fires unless the user chooses to run your app when the notification fires (they may not run it).
There is a request for repeat interval multipliers posted here. You can add comments to it. I suggest filing a bug report or feature request (url?) with Apple.
- How to set Local Notification repeat interval to custom time interval?
- Custom repeat interval for UILocalNotification
- Custom UILocalNotification repeat interval
- UILocalNotification Repeat
- non-fixed repeatInterval in UILocalNotification
- Can I have custom UILocalNotification repeat intervals (i.e. weekdays only?)
- Repeating UILocalNotifications with Gaps
- Repeat UILocalNotification on certain days of week
Custom UILocalNotification repeat interval
You should use three different local notification then.
For a list of available repeatIntervals see here.
Related Topics
How to Find the Address of a Stack Trace in Lldb for iOS
Avspeechsynthesizer in Background Mode
How to Use Objective-C Code with #Define MACros in Swift
iOS 7 - Restrict Landscape Orientation Only in One View Controller
New Itunes Connect Interface -- Should It Immediately Be Seen on "Prerelease"
Integrate Google Contacts API into My Swift 3 App
Xcode 10B5 - Duplicate Symbol Linker Error, Can't Compile with Crashlytics
Setting Up Uiscrollview to Swipe Between 3 View Controllers
Pass in a Type to a Generic Swift Extension, or Ideally Infer It
Why Is Allocating or Initializing Nsdateformatter Considered "Expensive"
iOS Autolayout and Uitoolbar/Uibarbuttonitems
Can Somebody Give a Snippet of "Append If Not Exists" Method in Swift Array
Avplayer Shows Black Screen When Playing Multiple Videos in Swift3 iOS