Latest 1.0
Homepage https://github.com/e-sites/Palladium
License MIT
Platforms ios 10.0, requires ARC
Frameworks Foundation, UserNotifications
Authors

Palladium

Palladium is part of the E-sites iOS Suite.


A lightweight framework to schedule and cancel local notifications.

forthebadge forthebadge

Platform
CocoaPods Compatible
Quality
Carthage compatible
Travis-ci

Installation

Podfile:

pod 'Palladium'

And then

pod install

Implementation

import Palladium

func authorize() {
    Palladium.shared.requestAuthorization { error in
        print("Authorization result: (String(describing: error))")
    }
}

func schedule() {
    let content = UNMutableNotificationContent()
    content.body = "This is a notification"
    content.title = Date().description
    var metaData = MetaData(id: "123")
    metaData.tags = [ "tag1", "tag2" ]
    let date = Date(timeIntervalSinceNow: 5)
    Palladium.shared.add(content: content, in: metaData, at: date) { request, error in
        print("Scheduled: (String(describing: request)), error: (String(describing: error))")
    }
}

func cancel() {
    Palladium.shared.cancelNotifications(tags: [ "tag2" ]) { identifiers, error in
        print("Cancelled: (identifiers?.count ?? 0), error: (String(describing: error))")
    }
}

Latest podspec

{
    "name": "Palladium",
    "version": "1.0",
    "platforms": {
        "ios": "10.0"
    },
    "summary": "A lightweight framework to schedule and cancel local notifications.",
    "authors": {
        "Bas van Kuijck": "[email protected]"
    },
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "homepage": "https://github.com/e-sites/Palladium",
    "source": {
        "git": "https://github.com/e-sites/Palladium.git",
        "tag": "1.0"
    },
    "source_files": "Palladium/**/*.{h,swift}",
    "requires_arc": true,
    "frameworks": [
        "Foundation",
        "UserNotifications"
    ]
}

Pin It on Pinterest

Share This