Skip to content

Instantly share code, notes, and snippets.

View shergin's full-sized avatar
🤔
But... why?

Valentin Shergin shergin

🤔
But... why?
View GitHub Profile
@phatblat
phatblat / gist:b10a463ff40d9dc6a808
Created July 7, 2015 20:29
Darwin notifications in swift
// MARK: - Darwin Notifications
static private let defaultsOnPhoneChangedDarwinNotificationName = "UserDefaultsOnPhoneDidChangeDarwinNotification"
static private let defaultsOnWatchChangedDarwinNotificationName = "UserDefaultsOnWatchDidChangeDarwinNotification"
static var notificationNameForReceiving: String?
static var notificationNameForSending: String?
/// Sets up the broadcast and receiving darwin notification names as well as
/// as the necessary observer callbacks.