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
import Cocoa
import Crashlytics
import os.log
import os.signpost
class Logger: NSObject {
class func log(object: [String: Any]?, for key: NSString) {
Answers.logCustomEvent(withName: key as String,
customAttributes: object)
}
class func log(object: [String: Any]?, for key: NSString) {
// TODO: Use a new analytics solution!
}
}
@available(OSX 10.14, *)

17
Clocker/Overall App/Reach.swift

@ -52,23 +52,6 @@ open class Reach {
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 {

Loading…
Cancel
Save