Latest 0.2.0
Homepage https://github.com/DroidsOnRoids/Habit
License MIT
Platforms ios 8.0, watchos 2.0, tvos 10.0
Frameworks UIKit, Foundation
Authors

Version
License
Platform

Requirements

iOS 8.0+, watchOS 2.0+, tvOS 10.0+

Swift 3

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

Habit is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "Habit"

Usage

Habit lets you repeat notifications every minute, hour, day or week. It’s pretty easy in use and after UILocalNotification or UNMutableNotificationContent (iOS 10.0+ only) initialization do just:

notification.repeatEvery(_:)

The parameter is NotificationBasis enum type. It lets you choose from:

  • Minute – fires in next full minute and does it every 60 seconds,
  • Hour – fires in next o’clock hour and does it every 60 minutes,
  • Day(time: Date) – fires each day at parameter’s time (an hour and a minute),
  • Week(time: Date, weekday: Weekday) – fires every weekday at first parameter’s time (an hour and a minute)

Author

Piotr Sochalewski, [email protected]

License

Habit is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Habit",
    "version": "0.2.0",
    "summary": "An easy-to-use library to make repeated notifications simpler",
    "description": "An easy-to-use little library to make repeated notifications simpler",
    "homepage": "https://github.com/DroidsOnRoids/Habit",
    "license": "MIT",
    "authors": {
        "Piotr Sochalewski": "[email protected]"
    },
    "source": {
        "git": "https://github.com/DroidsOnRoids/Habit.git",
        "tag": "0.2.0"
    },
    "platforms": {
        "ios": "8.0",
        "watchos": "2.0",
        "tvos": "10.0"
    },
    "source_files": "Habit/*.swift",
    "frameworks": [
        "UIKit",
        "Foundation"
    ]
}

Pin It on Pinterest

Share This