From c0128e4ba2eab9b088b525228db8b615be249500 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Mon, 7 Sep 2020 18:43:10 -0500 Subject: [PATCH] Removing unused functions + Answers. --- Clocker/Overall App/Logger.swift | 8 +++----- Clocker/Overall App/Reach.swift | 17 ----------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/Clocker/Overall App/Logger.swift b/Clocker/Overall App/Logger.swift index 748059e..a9d8eb2 100644 --- a/Clocker/Overall App/Logger.swift +++ b/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, *) diff --git a/Clocker/Overall App/Reach.swift b/Clocker/Overall App/Reach.swift index 7fbb5bd..191870e 100644 --- a/Clocker/Overall App/Reach.swift +++ b/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 {