AlarmKit is a simple way to make clock based alarms in Swift. Great for making clock apps, scheduled notifications, and anything else that depends on code running at an exact time.
let alarm = AlarmKit.Alarm(weekdays:[.Monday, .Wednesday, .Friday], hour:10, minute:45, {
doSomethingHereEveryOtherDay()
})
AlarmKit is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "AlarmKit"
let alarm = AlarmKit.Alarm(hour:10, minute:45, {
doSomethingOnce()
})
let alarm = AlarmKit.Alarm(weekdays:[.Monday, .Wednesday, .Friday], hour:10, minute:45, {
doSomethingHereEveryOtherDay()
})
let alarm = AlarmKit.Alarm(hour:10, minute:45, {
doSomethingHere()
})
alarm.hour = 9
alarm.minute = 0
let alarm = AlarmKit.Alarm(hour:10, minute:45, {
doSomethingHere()
})
alarm.block = {
doSomethingElseInstead()
}
let alarm = AlarmKit.Alarm(hour:10, minute:45, {
doSomethingHere()
})
alarm.turnOff()
alarm.turnOn()
To run the example project, clone the repo, and run pod install
from the Example directory first.
Daniel Brim, brimizer@gmail.com
AlarmKit is available under the MIT license. See the LICENSE file for more info.