This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
protocol Encoder { | |
func encode<Value>(_ value: Value) throws -> Data where Value : Encodable | |
} | |
extension JSONEncoder: Encoder {} | |
extension PropertyListEncoder: Encoder {} | |
protocol Decoder { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
enum BackgroundingSource: String { | |
case lock = "lock", homeOrSwitch = "homeOrSwitch" | |
} | |
protocol BackgroundingSourceTrackerDelegate: class { | |
func backgroundingSourceTracker(_ backgroundingSourceTracker: BackgroundingSourceTracker, didTrackBackgroundingWith source: BackgroundingSource) | |
} |