Browse Source

Removing unused functions + Answers.

pull/92/head
Abhishek 4 years ago
parent
commit
c0128e4ba2
  1. 8
      Clocker/Overall App/Logger.swift
  2. 17
      Clocker/Overall App/Reach.swift

8
Clocker/Overall App/Logger.swift

@ -1,15 +1,13 @@
// Copyright © 2015 Abhishek Banthia // Copyright © 2015 Abhishek Banthia
import Cocoa import Cocoa
import Crashlytics
import os.log import os.log
import os.signpost import os.signpost
class Logger: NSObject { class Logger: NSObject {
class func log(object: [String: Any]?, for key: NSString) { class func log(object: [String: Any]?, for key: NSString) {
Answers.logCustomEvent(withName: key as String, // TODO: Use a new analytics solution!
customAttributes: object) }
}
} }
@available(OSX 10.14, *) @available(OSX 10.14, *)

17
Clocker/Overall App/Reach.swift

@ -52,23 +52,6 @@ open class Reach {
return ReachabilityStatus(reachabilityFlags: flags) return ReachabilityStatus(reachabilityFlags: flags)
} }
func monitorReachabilityChanges() {
let host = "google.com"
var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil)
let reachability = SCNetworkReachabilityCreateWithName(nil, host)!
SCNetworkReachabilitySetCallback(reachability, { _, flags, _ in
let status = ReachabilityStatus(reachabilityFlags: flags)
NotificationCenter.default.post(name: Notification.Name(rawValue: reachabilityStatusChangedNotification),
object: nil,
userInfo: ["Status": status.description])
}, &context)
SCNetworkReachabilityScheduleWithRunLoop(reachability, CFRunLoopGetMain(), CFRunLoopMode.commonModes.rawValue)
}
} }
extension ReachabilityStatus { extension ReachabilityStatus {

Loading…
Cancel
Save