One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
// | |
// Created by Ben Asher on 6/13/18. | |
// Copyright © 2018-present PlanGrid. All rights reserved. | |
// | |
import Foundation | |
import MapKit | |
import UserNotifications | |
#if swift(>=4.2) |
// ---------------------------------------------------- | |
// These 3 helpers is all you need to unlock functional | |
// setters for every field of every immutable struct. | |
// ---------------------------------------------------- | |
// A generic way to a lift writable key path and a value to a setter function. | |
func set<A, B>(_ kp: WritableKeyPath<A, B>, _ b: B) -> (A) -> A { | |
return { a in | |
var a = a | |
a[keyPath: kp] = b |
import Foundation | |
public let Defaults = UserDefaults.standard | |
open class DefaultsKeys { | |
fileprivate init() {} | |
} | |
open class DefaultsKey<ValueType>: DefaultsKeys { | |
public let _key: String |
import Foundation | |
import Compression | |
/// A convenience class for compressing an NSData object. | |
/// | |
/// Example: | |
/// ``` | |
/// let compression = Compression(algorithm: .ZLIB) | |
/// let compressedData = compression.compressData(data) | |
/// let decompressedData = compresison.decompressData(compressedData) |
// NSCalendar+Swift.swift | |
// A set of Swift-idiomatic methods for NSCalendar | |
// | |
// (c) 2015 Nate Cook, licensed under the MIT license | |
extension NSCalendar { | |
/// Returns the hour, minute, second, and nanoseconds of a given date. | |
func getTimeFromDate(date: NSDate) -> (hour: Int, minute: Int, second: Int, nanosecond: Int) { | |
var (hour, minute, second, nanosecond) = (0, 0, 0, 0) | |
getHour(&hour, minute: &minute, second: &second, nanosecond: &nanosecond, fromDate: date) |
/* | |
File: KeychainItemWrapper.h | |
Abstract: | |
Objective-C wrapper for accessing a single keychain item. | |
Version: 1.2 - ARCified | |
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple | |
Inc. ("Apple") in consideration of your agreement to the following | |
terms, and your use, installation, modification or redistribution of |