From 10aa9a9c74d1c2b09ef9c60f522c34d3835c81b5 Mon Sep 17 00:00:00 2001 From: Brad Root Date: Sat, 30 May 2020 10:53:31 -0700 Subject: [PATCH 01/58] get new iOS target in place --- PiBar for iOS/AppDelegate.swift | 37 +++ .../AppIcon.appiconset/Contents.json | 98 ++++++++ .../Assets.xcassets/Contents.json | 0 .../first.imageset/Contents.json | 12 + .../Assets.xcassets/first.imageset/first.pdf | Bin 0 -> 2465 bytes .../second.imageset/Contents.json | 12 + .../second.imageset/second.pdf | Bin 0 -> 2423 bytes .../Base.lproj/LaunchScreen.storyboard | 25 ++ PiBar for iOS/Base.lproj/Main.storyboard | 102 ++++++++ PiBar for iOS/FirstViewController.swift | 20 ++ PiBar for iOS/Info.plist | 74 ++++++ PiBar for iOS/SceneDelegate.swift | 53 +++++ PiBar for iOS/SecondViewController.swift | 20 ++ {PiBar => PiBar for macOS}/AppDelegate.swift | 0 .../AppIcon.appiconset/Contents.json | 0 .../AppIcon.appiconset/pibar_icon_128px.png | Bin .../pibar_icon_128px@2x.png | Bin .../AppIcon.appiconset/pibar_icon_16px.png | Bin .../AppIcon.appiconset/pibar_icon_16px@2x.png | Bin .../AppIcon.appiconset/pibar_icon_256px.png | Bin .../pibar_icon_256px@2x.png | Bin .../AppIcon.appiconset/pibar_icon_32px.png | Bin .../AppIcon.appiconset/pibar_icon_32px@2x.png | Bin .../AppIcon.appiconset/pibar_icon_512px.png | Bin .../pibar_icon_512px@2x.png | Bin PiBar for macOS/Assets.xcassets/Contents.json | 6 + .../icon.imageset/Contents.json | 0 .../icon.imageset/pibar_menuIcon_22px.pdf | Bin .../iconImage.imageset/Contents.json | 0 .../iconImage.imageset/pibar_icon_128px.png | Bin .../iconImage.imageset/pibar_icon_32px@2x.png | Bin .../Data Sources/PiholeAPI.swift | 0 .../Data Sources/Preferences.swift | 0 .../Data Sources/Structs.swift | 0 {PiBar => PiBar for macOS}/Database.swift | 0 {PiBar => PiBar for macOS}/Info.plist | 2 +- .../Manager/Operations/AsyncOperation.swift | 0 .../ChangePiholeStatusOperation.swift | 0 .../Operations/UpdatePiholeOperation.swift | 0 .../Manager/PiBarManager.swift | 0 {PiBar => PiBar for macOS}/PiBar.entitlements | 0 .../Utilities/Extensions.swift | 0 .../Utilities/Logging.swift | 0 .../Views/About/AboutViewController.swift | 0 .../Views/About/AboutWindowController.swift | 0 .../Views/Base.lproj/Main.storyboard | 0 .../Views/Main Menu/MainMenu.xib | 0 .../Views/Main Menu/MainMenuController.swift | 0 .../PiholeSettingsViewController.swift | 0 .../PreferencesViewController.swift | 0 .../PreferencesWindowController.swift | 0 PiBar.xcodeproj/project.pbxproj | 206 ++++++++++++++--- Podfile | 8 +- Podfile.lock | 2 +- Pods/Manifest.lock | 2 +- Pods/Pods.xcodeproj/project.pbxproj | 218 +++++++++--------- .../Pods-PiBar for macOS-Info.plist} | 0 ...PiBar for macOS-acknowledgements.markdown} | 0 ...ds-PiBar for macOS-acknowledgements.plist} | 0 .../Pods-PiBar for macOS-dummy.m | 5 + ...OS-frameworks-Debug-input-files.xcfilelist | 2 + ...-frameworks-Debug-output-files.xcfilelist} | 0 ...-frameworks-Release-input-files.xcfilelist | 2 + ...rameworks-Release-output-files.xcfilelist} | 0 .../Pods-PiBar for macOS-frameworks.sh} | 0 .../Pods-PiBar for macOS-umbrella.h} | 4 +- .../Pods-PiBar for macOS.debug.xcconfig} | 0 .../Pods-PiBar for macOS.modulemap | 6 + .../Pods-PiBar for macOS.release.xcconfig} | 0 .../Pods-PiBar/Pods-PiBar-dummy.m | 5 - ...ar-frameworks-Debug-input-files.xcfilelist | 2 - ...-frameworks-Release-input-files.xcfilelist | 2 - .../Pods-PiBar/Pods-PiBar.modulemap | 6 - 73 files changed, 769 insertions(+), 162 deletions(-) create mode 100644 PiBar for iOS/AppDelegate.swift create mode 100644 PiBar for iOS/Assets.xcassets/AppIcon.appiconset/Contents.json rename {PiBar => PiBar for iOS}/Assets.xcassets/Contents.json (100%) create mode 100644 PiBar for iOS/Assets.xcassets/first.imageset/Contents.json create mode 100644 PiBar for iOS/Assets.xcassets/first.imageset/first.pdf create mode 100644 PiBar for iOS/Assets.xcassets/second.imageset/Contents.json create mode 100644 PiBar for iOS/Assets.xcassets/second.imageset/second.pdf create mode 100644 PiBar for iOS/Base.lproj/LaunchScreen.storyboard create mode 100644 PiBar for iOS/Base.lproj/Main.storyboard create mode 100644 PiBar for iOS/FirstViewController.swift create mode 100644 PiBar for iOS/Info.plist create mode 100644 PiBar for iOS/SceneDelegate.swift create mode 100644 PiBar for iOS/SecondViewController.swift rename {PiBar => PiBar for macOS}/AppDelegate.swift (100%) rename {PiBar => PiBar for macOS}/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename {PiBar => PiBar for macOS}/Assets.xcassets/AppIcon.appiconset/pibar_icon_128px.png (100%) rename {PiBar => PiBar for macOS}/Assets.xcassets/AppIcon.appiconset/pibar_icon_128px@2x.png (100%) rename {PiBar => PiBar for macOS}/Assets.xcassets/AppIcon.appiconset/pibar_icon_16px.png (100%) rename {PiBar => PiBar for macOS}/Assets.xcassets/AppIcon.appiconset/pibar_icon_16px@2x.png (100%) rename {PiBar => PiBar for macOS}/Assets.xcassets/AppIcon.appiconset/pibar_icon_256px.png (100%) rename {PiBar => PiBar for macOS}/Assets.xcassets/AppIcon.appiconset/pibar_icon_256px@2x.png (100%) rename {PiBar => PiBar for macOS}/Assets.xcassets/AppIcon.appiconset/pibar_icon_32px.png (100%) rename {PiBar => PiBar for macOS}/Assets.xcassets/AppIcon.appiconset/pibar_icon_32px@2x.png (100%) rename {PiBar => PiBar for macOS}/Assets.xcassets/AppIcon.appiconset/pibar_icon_512px.png (100%) rename {PiBar => PiBar for macOS}/Assets.xcassets/AppIcon.appiconset/pibar_icon_512px@2x.png (100%) create mode 100644 PiBar for macOS/Assets.xcassets/Contents.json rename {PiBar => PiBar for macOS}/Assets.xcassets/icon.imageset/Contents.json (100%) rename {PiBar => PiBar for macOS}/Assets.xcassets/icon.imageset/pibar_menuIcon_22px.pdf (100%) rename {PiBar => PiBar for macOS}/Assets.xcassets/iconImage.imageset/Contents.json (100%) rename {PiBar => PiBar for macOS}/Assets.xcassets/iconImage.imageset/pibar_icon_128px.png (100%) rename {PiBar => PiBar for macOS}/Assets.xcassets/iconImage.imageset/pibar_icon_32px@2x.png (100%) rename {PiBar => PiBar for macOS}/Data Sources/PiholeAPI.swift (100%) rename {PiBar => PiBar for macOS}/Data Sources/Preferences.swift (100%) rename {PiBar => PiBar for macOS}/Data Sources/Structs.swift (100%) rename {PiBar => PiBar for macOS}/Database.swift (100%) rename {PiBar => PiBar for macOS}/Info.plist (98%) rename {PiBar => PiBar for macOS}/Manager/Operations/AsyncOperation.swift (100%) rename {PiBar => PiBar for macOS}/Manager/Operations/ChangePiholeStatusOperation.swift (100%) rename {PiBar => PiBar for macOS}/Manager/Operations/UpdatePiholeOperation.swift (100%) rename {PiBar => PiBar for macOS}/Manager/PiBarManager.swift (100%) rename {PiBar => PiBar for macOS}/PiBar.entitlements (100%) rename {PiBar => PiBar for macOS}/Utilities/Extensions.swift (100%) rename {PiBar => PiBar for macOS}/Utilities/Logging.swift (100%) rename {PiBar => PiBar for macOS}/Views/About/AboutViewController.swift (100%) rename {PiBar => PiBar for macOS}/Views/About/AboutWindowController.swift (100%) rename {PiBar => PiBar for macOS}/Views/Base.lproj/Main.storyboard (100%) rename {PiBar => PiBar for macOS}/Views/Main Menu/MainMenu.xib (100%) rename {PiBar => PiBar for macOS}/Views/Main Menu/MainMenuController.swift (100%) rename {PiBar => PiBar for macOS}/Views/Preferences/PiholeSettingsViewController.swift (100%) rename {PiBar => PiBar for macOS}/Views/Preferences/PreferencesViewController.swift (100%) rename {PiBar => PiBar for macOS}/Views/Preferences/PreferencesWindowController.swift (100%) rename Pods/Target Support Files/{Pods-PiBar/Pods-PiBar-Info.plist => Pods-PiBar for macOS/Pods-PiBar for macOS-Info.plist} (100%) rename Pods/Target Support Files/{Pods-PiBar/Pods-PiBar-acknowledgements.markdown => Pods-PiBar for macOS/Pods-PiBar for macOS-acknowledgements.markdown} (100%) rename Pods/Target Support Files/{Pods-PiBar/Pods-PiBar-acknowledgements.plist => Pods-PiBar for macOS/Pods-PiBar for macOS-acknowledgements.plist} (100%) create mode 100644 Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-dummy.m create mode 100644 Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks-Debug-input-files.xcfilelist rename Pods/Target Support Files/{Pods-PiBar/Pods-PiBar-frameworks-Debug-output-files.xcfilelist => Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks-Debug-output-files.xcfilelist} (100%) create mode 100644 Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks-Release-input-files.xcfilelist rename Pods/Target Support Files/{Pods-PiBar/Pods-PiBar-frameworks-Release-output-files.xcfilelist => Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks-Release-output-files.xcfilelist} (100%) rename Pods/Target Support Files/{Pods-PiBar/Pods-PiBar-frameworks.sh => Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks.sh} (100%) rename Pods/Target Support Files/{Pods-PiBar/Pods-PiBar-umbrella.h => Pods-PiBar for macOS/Pods-PiBar for macOS-umbrella.h} (59%) rename Pods/Target Support Files/{Pods-PiBar/Pods-PiBar.debug.xcconfig => Pods-PiBar for macOS/Pods-PiBar for macOS.debug.xcconfig} (100%) create mode 100644 Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS.modulemap rename Pods/Target Support Files/{Pods-PiBar/Pods-PiBar.release.xcconfig => Pods-PiBar for macOS/Pods-PiBar for macOS.release.xcconfig} (100%) delete mode 100644 Pods/Target Support Files/Pods-PiBar/Pods-PiBar-dummy.m delete mode 100644 Pods/Target Support Files/Pods-PiBar/Pods-PiBar-frameworks-Debug-input-files.xcfilelist delete mode 100644 Pods/Target Support Files/Pods-PiBar/Pods-PiBar-frameworks-Release-input-files.xcfilelist delete mode 100644 Pods/Target Support Files/Pods-PiBar/Pods-PiBar.modulemap diff --git a/PiBar for iOS/AppDelegate.swift b/PiBar for iOS/AppDelegate.swift new file mode 100644 index 0000000..d150830 --- /dev/null +++ b/PiBar for iOS/AppDelegate.swift @@ -0,0 +1,37 @@ +// +// AppDelegate.swift +// PiBar for iOS +// +// Created by Brad Root on 5/30/20. +// Copyright © 2020 Brad Root. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + // MARK: UISceneSession Lifecycle + + func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + } + + func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. + } + + +} + diff --git a/PiBar for iOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/PiBar for iOS/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..9221b9b --- /dev/null +++ b/PiBar for iOS/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/PiBar/Assets.xcassets/Contents.json b/PiBar for iOS/Assets.xcassets/Contents.json similarity index 100% rename from PiBar/Assets.xcassets/Contents.json rename to PiBar for iOS/Assets.xcassets/Contents.json diff --git a/PiBar for iOS/Assets.xcassets/first.imageset/Contents.json b/PiBar for iOS/Assets.xcassets/first.imageset/Contents.json new file mode 100644 index 0000000..33a7451 --- /dev/null +++ b/PiBar for iOS/Assets.xcassets/first.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "first.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PiBar for iOS/Assets.xcassets/first.imageset/first.pdf b/PiBar for iOS/Assets.xcassets/first.imageset/first.pdf new file mode 100644 index 0000000000000000000000000000000000000000..47d911dea647d55983671ead4d08b6f6b3600715 GIT binary patch literal 2465 zcmai03se(l7FLvisY+L#f-EBsK`11Xkc1=%MIujmB|xQ!>5vQ%APFP`Mlf5nSPOKE z2-^C>7DZkM!J;Da5{kfrC?Kvp3J41-3shFX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I8Iedr+x>wI zq@&04fsADHfBccq^gpm8Q_u-~Uj|Z$YwSR(^_mzUb!}Xb2Cj`uqphg}v_Y%?Fs=;= zWq3s{hy)Tu!ji@RJsd$C+G{F6V2j1*Xk+7xo|LO7M2yb)(wc=%x-AclP9pLsbTF7m tf?*P!2EjJu5MD57P32Q4pdJ3tO_shCDT2=K;$ebx8ymcd$v!V9{2$sQiO>K5 literal 0 HcmV?d00001 diff --git a/PiBar for iOS/Assets.xcassets/second.imageset/Contents.json b/PiBar for iOS/Assets.xcassets/second.imageset/Contents.json new file mode 100644 index 0000000..03bd9c9 --- /dev/null +++ b/PiBar for iOS/Assets.xcassets/second.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "second.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PiBar for iOS/Assets.xcassets/second.imageset/second.pdf b/PiBar for iOS/Assets.xcassets/second.imageset/second.pdf new file mode 100644 index 0000000000000000000000000000000000000000..401614e288b4b160471c2776bed6f09762af3e1c GIT binary patch literal 2423 zcmai02~-nz8dqq7rWU#)x2z)&iMWtV?gK$2a)?|BP!TbkV}J-Gl1wmy+3G9S0=uOY zwCjai6uBOPMMdNiN`VDYKwLQr2#W^`R93*Ua=0^)EGYY4=grIf|KIohziYnv{elnR zdN_hk6db<(+3RPcxs!iut8c(j0TLh=9mY931H^rhEE0|aXo!dh5Iv+ZFr+}9F+v#P zLSnfD0$f~hN>~92V{z)WJA&2)5rW!|I?;o?oI*%zejJiuY>hFLQwKlAa9O+PnPh#% zJp~JAfs-De6u@;{cREMs}D-sGib_4>50m8_|Uj-zC0m@Qx zJV+^5Da4Qxpf3sBtKZs<_aI$Cb1T+h<->yL^rfiGNelYkqgC3#SqVP_iy*_RPcbjH)xYf zvYdC-)D_t8c{=5%;$VJQxs_#61J*kuXMC?|&PbPo-7uSxoNr~&J94|gKk+03JGXXM zx4w~=^VUzWqQveu_ilRgP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Main.storyboard b/PiBar for iOS/Base.lproj/Main.storyboard new file mode 100644 index 0000000..7a85710 --- /dev/null +++ b/PiBar for iOS/Base.lproj/Main.storyboard @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PiBar for iOS/FirstViewController.swift b/PiBar for iOS/FirstViewController.swift new file mode 100644 index 0000000..fb57cf6 --- /dev/null +++ b/PiBar for iOS/FirstViewController.swift @@ -0,0 +1,20 @@ +// +// FirstViewController.swift +// PiBar for iOS +// +// Created by Brad Root on 5/30/20. +// Copyright © 2020 Brad Root. All rights reserved. +// + +import UIKit + +class FirstViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + } + + +} + diff --git a/PiBar for iOS/Info.plist b/PiBar for iOS/Info.plist new file mode 100644 index 0000000..e7f6f58 --- /dev/null +++ b/PiBar for iOS/Info.plist @@ -0,0 +1,74 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UIStatusBarTintParameters + + UINavigationBar + + Style + UIBarStyleDefault + Translucent + + + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/PiBar for iOS/SceneDelegate.swift b/PiBar for iOS/SceneDelegate.swift new file mode 100644 index 0000000..cdf1a40 --- /dev/null +++ b/PiBar for iOS/SceneDelegate.swift @@ -0,0 +1,53 @@ +// +// SceneDelegate.swift +// PiBar for iOS +// +// Created by Brad Root on 5/30/20. +// Copyright © 2020 Brad Root. All rights reserved. +// + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). + guard let _ = (scene as? UIWindowScene) else { return } + } + + func sceneDidDisconnect(_ scene: UIScene) { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). + } + + func sceneDidBecomeActive(_ scene: UIScene) { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + } + + func sceneWillResignActive(_ scene: UIScene) { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). + } + + func sceneWillEnterForeground(_ scene: UIScene) { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. + } + + func sceneDidEnterBackground(_ scene: UIScene) { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + } + + +} + diff --git a/PiBar for iOS/SecondViewController.swift b/PiBar for iOS/SecondViewController.swift new file mode 100644 index 0000000..3a1ec6b --- /dev/null +++ b/PiBar for iOS/SecondViewController.swift @@ -0,0 +1,20 @@ +// +// SecondViewController.swift +// PiBar for iOS +// +// Created by Brad Root on 5/30/20. +// Copyright © 2020 Brad Root. All rights reserved. +// + +import UIKit + +class SecondViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + } + + +} + diff --git a/PiBar/AppDelegate.swift b/PiBar for macOS/AppDelegate.swift similarity index 100% rename from PiBar/AppDelegate.swift rename to PiBar for macOS/AppDelegate.swift diff --git a/PiBar/Assets.xcassets/AppIcon.appiconset/Contents.json b/PiBar for macOS/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from PiBar/Assets.xcassets/AppIcon.appiconset/Contents.json rename to PiBar for macOS/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/PiBar/Assets.xcassets/AppIcon.appiconset/pibar_icon_128px.png b/PiBar for macOS/Assets.xcassets/AppIcon.appiconset/pibar_icon_128px.png similarity index 100% rename from PiBar/Assets.xcassets/AppIcon.appiconset/pibar_icon_128px.png rename to PiBar for macOS/Assets.xcassets/AppIcon.appiconset/pibar_icon_128px.png diff --git a/PiBar/Assets.xcassets/AppIcon.appiconset/pibar_icon_128px@2x.png b/PiBar for macOS/Assets.xcassets/AppIcon.appiconset/pibar_icon_128px@2x.png similarity index 100% rename from PiBar/Assets.xcassets/AppIcon.appiconset/pibar_icon_128px@2x.png rename to PiBar for macOS/Assets.xcassets/AppIcon.appiconset/pibar_icon_128px@2x.png diff --git a/PiBar/Assets.xcassets/AppIcon.appiconset/pibar_icon_16px.png b/PiBar for macOS/Assets.xcassets/AppIcon.appiconset/pibar_icon_16px.png similarity index 100% rename from PiBar/Assets.xcassets/AppIcon.appiconset/pibar_icon_16px.png rename to PiBar for macOS/Assets.xcassets/AppIcon.appiconset/pibar_icon_16px.png diff --git a/PiBar/Assets.xcassets/AppIcon.appiconset/pibar_icon_16px@2x.png b/PiBar for macOS/Assets.xcassets/AppIcon.appiconset/pibar_icon_16px@2x.png similarity index 100% rename from PiBar/Assets.xcassets/AppIcon.appiconset/pibar_icon_16px@2x.png rename to PiBar for macOS/Assets.xcassets/AppIcon.appiconset/pibar_icon_16px@2x.png diff --git a/PiBar/Assets.xcassets/AppIcon.appiconset/pibar_icon_256px.png b/PiBar for macOS/Assets.xcassets/AppIcon.appiconset/pibar_icon_256px.png similarity index 100% rename from PiBar/Assets.xcassets/AppIcon.appiconset/pibar_icon_256px.png rename to PiBar for macOS/Assets.xcassets/AppIcon.appiconset/pibar_icon_256px.png diff --git a/PiBar/Assets.xcassets/AppIcon.appiconset/pibar_icon_256px@2x.png b/PiBar for macOS/Assets.xcassets/AppIcon.appiconset/pibar_icon_256px@2x.png similarity index 100% rename from PiBar/Assets.xcassets/AppIcon.appiconset/pibar_icon_256px@2x.png rename to PiBar for macOS/Assets.xcassets/AppIcon.appiconset/pibar_icon_256px@2x.png diff --git a/PiBar/Assets.xcassets/AppIcon.appiconset/pibar_icon_32px.png b/PiBar for macOS/Assets.xcassets/AppIcon.appiconset/pibar_icon_32px.png similarity index 100% rename from PiBar/Assets.xcassets/AppIcon.appiconset/pibar_icon_32px.png rename to PiBar for macOS/Assets.xcassets/AppIcon.appiconset/pibar_icon_32px.png diff --git a/PiBar/Assets.xcassets/AppIcon.appiconset/pibar_icon_32px@2x.png b/PiBar for macOS/Assets.xcassets/AppIcon.appiconset/pibar_icon_32px@2x.png similarity index 100% rename from PiBar/Assets.xcassets/AppIcon.appiconset/pibar_icon_32px@2x.png rename to PiBar for macOS/Assets.xcassets/AppIcon.appiconset/pibar_icon_32px@2x.png diff --git a/PiBar/Assets.xcassets/AppIcon.appiconset/pibar_icon_512px.png b/PiBar for macOS/Assets.xcassets/AppIcon.appiconset/pibar_icon_512px.png similarity index 100% rename from PiBar/Assets.xcassets/AppIcon.appiconset/pibar_icon_512px.png rename to PiBar for macOS/Assets.xcassets/AppIcon.appiconset/pibar_icon_512px.png diff --git a/PiBar/Assets.xcassets/AppIcon.appiconset/pibar_icon_512px@2x.png b/PiBar for macOS/Assets.xcassets/AppIcon.appiconset/pibar_icon_512px@2x.png similarity index 100% rename from PiBar/Assets.xcassets/AppIcon.appiconset/pibar_icon_512px@2x.png rename to PiBar for macOS/Assets.xcassets/AppIcon.appiconset/pibar_icon_512px@2x.png diff --git a/PiBar for macOS/Assets.xcassets/Contents.json b/PiBar for macOS/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/PiBar for macOS/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/PiBar/Assets.xcassets/icon.imageset/Contents.json b/PiBar for macOS/Assets.xcassets/icon.imageset/Contents.json similarity index 100% rename from PiBar/Assets.xcassets/icon.imageset/Contents.json rename to PiBar for macOS/Assets.xcassets/icon.imageset/Contents.json diff --git a/PiBar/Assets.xcassets/icon.imageset/pibar_menuIcon_22px.pdf b/PiBar for macOS/Assets.xcassets/icon.imageset/pibar_menuIcon_22px.pdf similarity index 100% rename from PiBar/Assets.xcassets/icon.imageset/pibar_menuIcon_22px.pdf rename to PiBar for macOS/Assets.xcassets/icon.imageset/pibar_menuIcon_22px.pdf diff --git a/PiBar/Assets.xcassets/iconImage.imageset/Contents.json b/PiBar for macOS/Assets.xcassets/iconImage.imageset/Contents.json similarity index 100% rename from PiBar/Assets.xcassets/iconImage.imageset/Contents.json rename to PiBar for macOS/Assets.xcassets/iconImage.imageset/Contents.json diff --git a/PiBar/Assets.xcassets/iconImage.imageset/pibar_icon_128px.png b/PiBar for macOS/Assets.xcassets/iconImage.imageset/pibar_icon_128px.png similarity index 100% rename from PiBar/Assets.xcassets/iconImage.imageset/pibar_icon_128px.png rename to PiBar for macOS/Assets.xcassets/iconImage.imageset/pibar_icon_128px.png diff --git a/PiBar/Assets.xcassets/iconImage.imageset/pibar_icon_32px@2x.png b/PiBar for macOS/Assets.xcassets/iconImage.imageset/pibar_icon_32px@2x.png similarity index 100% rename from PiBar/Assets.xcassets/iconImage.imageset/pibar_icon_32px@2x.png rename to PiBar for macOS/Assets.xcassets/iconImage.imageset/pibar_icon_32px@2x.png diff --git a/PiBar/Data Sources/PiholeAPI.swift b/PiBar for macOS/Data Sources/PiholeAPI.swift similarity index 100% rename from PiBar/Data Sources/PiholeAPI.swift rename to PiBar for macOS/Data Sources/PiholeAPI.swift diff --git a/PiBar/Data Sources/Preferences.swift b/PiBar for macOS/Data Sources/Preferences.swift similarity index 100% rename from PiBar/Data Sources/Preferences.swift rename to PiBar for macOS/Data Sources/Preferences.swift diff --git a/PiBar/Data Sources/Structs.swift b/PiBar for macOS/Data Sources/Structs.swift similarity index 100% rename from PiBar/Data Sources/Structs.swift rename to PiBar for macOS/Data Sources/Structs.swift diff --git a/PiBar/Database.swift b/PiBar for macOS/Database.swift similarity index 100% rename from PiBar/Database.swift rename to PiBar for macOS/Database.swift diff --git a/PiBar/Info.plist b/PiBar for macOS/Info.plist similarity index 98% rename from PiBar/Info.plist rename to PiBar for macOS/Info.plist index 48970f8..f02d185 100644 --- a/PiBar/Info.plist +++ b/PiBar for macOS/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 669 + 672 LSApplicationCategoryType public.app-category.utilities LSMinimumSystemVersion diff --git a/PiBar/Manager/Operations/AsyncOperation.swift b/PiBar for macOS/Manager/Operations/AsyncOperation.swift similarity index 100% rename from PiBar/Manager/Operations/AsyncOperation.swift rename to PiBar for macOS/Manager/Operations/AsyncOperation.swift diff --git a/PiBar/Manager/Operations/ChangePiholeStatusOperation.swift b/PiBar for macOS/Manager/Operations/ChangePiholeStatusOperation.swift similarity index 100% rename from PiBar/Manager/Operations/ChangePiholeStatusOperation.swift rename to PiBar for macOS/Manager/Operations/ChangePiholeStatusOperation.swift diff --git a/PiBar/Manager/Operations/UpdatePiholeOperation.swift b/PiBar for macOS/Manager/Operations/UpdatePiholeOperation.swift similarity index 100% rename from PiBar/Manager/Operations/UpdatePiholeOperation.swift rename to PiBar for macOS/Manager/Operations/UpdatePiholeOperation.swift diff --git a/PiBar/Manager/PiBarManager.swift b/PiBar for macOS/Manager/PiBarManager.swift similarity index 100% rename from PiBar/Manager/PiBarManager.swift rename to PiBar for macOS/Manager/PiBarManager.swift diff --git a/PiBar/PiBar.entitlements b/PiBar for macOS/PiBar.entitlements similarity index 100% rename from PiBar/PiBar.entitlements rename to PiBar for macOS/PiBar.entitlements diff --git a/PiBar/Utilities/Extensions.swift b/PiBar for macOS/Utilities/Extensions.swift similarity index 100% rename from PiBar/Utilities/Extensions.swift rename to PiBar for macOS/Utilities/Extensions.swift diff --git a/PiBar/Utilities/Logging.swift b/PiBar for macOS/Utilities/Logging.swift similarity index 100% rename from PiBar/Utilities/Logging.swift rename to PiBar for macOS/Utilities/Logging.swift diff --git a/PiBar/Views/About/AboutViewController.swift b/PiBar for macOS/Views/About/AboutViewController.swift similarity index 100% rename from PiBar/Views/About/AboutViewController.swift rename to PiBar for macOS/Views/About/AboutViewController.swift diff --git a/PiBar/Views/About/AboutWindowController.swift b/PiBar for macOS/Views/About/AboutWindowController.swift similarity index 100% rename from PiBar/Views/About/AboutWindowController.swift rename to PiBar for macOS/Views/About/AboutWindowController.swift diff --git a/PiBar/Views/Base.lproj/Main.storyboard b/PiBar for macOS/Views/Base.lproj/Main.storyboard similarity index 100% rename from PiBar/Views/Base.lproj/Main.storyboard rename to PiBar for macOS/Views/Base.lproj/Main.storyboard diff --git a/PiBar/Views/Main Menu/MainMenu.xib b/PiBar for macOS/Views/Main Menu/MainMenu.xib similarity index 100% rename from PiBar/Views/Main Menu/MainMenu.xib rename to PiBar for macOS/Views/Main Menu/MainMenu.xib diff --git a/PiBar/Views/Main Menu/MainMenuController.swift b/PiBar for macOS/Views/Main Menu/MainMenuController.swift similarity index 100% rename from PiBar/Views/Main Menu/MainMenuController.swift rename to PiBar for macOS/Views/Main Menu/MainMenuController.swift diff --git a/PiBar/Views/Preferences/PiholeSettingsViewController.swift b/PiBar for macOS/Views/Preferences/PiholeSettingsViewController.swift similarity index 100% rename from PiBar/Views/Preferences/PiholeSettingsViewController.swift rename to PiBar for macOS/Views/Preferences/PiholeSettingsViewController.swift diff --git a/PiBar/Views/Preferences/PreferencesViewController.swift b/PiBar for macOS/Views/Preferences/PreferencesViewController.swift similarity index 100% rename from PiBar/Views/Preferences/PreferencesViewController.swift rename to PiBar for macOS/Views/Preferences/PreferencesViewController.swift diff --git a/PiBar/Views/Preferences/PreferencesWindowController.swift b/PiBar for macOS/Views/Preferences/PreferencesWindowController.swift similarity index 100% rename from PiBar/Views/Preferences/PreferencesWindowController.swift rename to PiBar for macOS/Views/Preferences/PreferencesWindowController.swift diff --git a/PiBar.xcodeproj/project.pbxproj b/PiBar.xcodeproj/project.pbxproj index 942ea54..0a72673 100644 --- a/PiBar.xcodeproj/project.pbxproj +++ b/PiBar.xcodeproj/project.pbxproj @@ -7,7 +7,13 @@ objects = { /* Begin PBXBuildFile section */ - 32954590BDD997C520227DB6 /* Pods_PiBar.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04F07DFA596CEEEADF9A90A0 /* Pods_PiBar.framework */; }; + 440DE4642482D37D00C55354 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 440DE4632482D37D00C55354 /* AppDelegate.swift */; }; + 440DE4662482D37D00C55354 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 440DE4652482D37D00C55354 /* SceneDelegate.swift */; }; + 440DE4682482D37D00C55354 /* FirstViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 440DE4672482D37D00C55354 /* FirstViewController.swift */; }; + 440DE46A2482D37D00C55354 /* SecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 440DE4692482D37D00C55354 /* SecondViewController.swift */; }; + 440DE46D2482D37D00C55354 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 440DE46B2482D37D00C55354 /* Main.storyboard */; }; + 440DE46F2482D37D00C55354 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 440DE46E2482D37D00C55354 /* Assets.xcassets */; }; + 440DE4722482D37D00C55354 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 440DE4702482D37D00C55354 /* LaunchScreen.storyboard */; }; 4415D73424731FE0009E0B31 /* Structs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4415D73324731FE0009E0B31 /* Structs.swift */; }; 4415D73624747331009E0B31 /* Logging.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4415D73524747331009E0B31 /* Logging.swift */; }; 441E78A9247E21DE00FBC7A0 /* LaunchAtLogin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 441E78A8247E21DE00FBC7A0 /* LaunchAtLogin.framework */; }; @@ -30,6 +36,7 @@ 449395EE2471C47F00FA0C34 /* PiholeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 449395ED2471C47F00FA0C34 /* PiholeAPI.swift */; }; 44B6DAF2247C70F500D364EC /* PiholeSettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44B6DAF1247C70F500D364EC /* PiholeSettingsViewController.swift */; }; 44FFB092247627B100DCEDEC /* PiBarManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44FFB091247627B100DCEDEC /* PiBarManager.swift */; }; + D8E2BD45380E2681F4F7BF99 /* Pods_PiBar_for_macOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB442844C550DE69A8DE1422 /* Pods_PiBar_for_macOS.framework */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -47,8 +54,16 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 04F07DFA596CEEEADF9A90A0 /* Pods_PiBar.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PiBar.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 08A4966FFD2196F42B1CA80F /* Pods-PiBar.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PiBar.release.xcconfig"; path = "Target Support Files/Pods-PiBar/Pods-PiBar.release.xcconfig"; sourceTree = ""; }; + 440DE4612482D37C00C55354 /* PiBar for iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "PiBar for iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 440DE4632482D37D00C55354 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 440DE4652482D37D00C55354 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 440DE4672482D37D00C55354 /* FirstViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstViewController.swift; sourceTree = ""; }; + 440DE4692482D37D00C55354 /* SecondViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecondViewController.swift; sourceTree = ""; }; + 440DE46C2482D37D00C55354 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 440DE46E2482D37D00C55354 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 440DE4712482D37D00C55354 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 440DE4732482D37D00C55354 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 4415D73324731FE0009E0B31 /* Structs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Structs.swift; sourceTree = ""; }; 4415D73524747331009E0B31 /* Logging.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Logging.swift; sourceTree = ""; }; 441E78A8247E21DE00FBC7A0 /* LaunchAtLogin.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LaunchAtLogin.framework; path = Carthage/Build/Mac/LaunchAtLogin.framework; sourceTree = ""; }; @@ -61,7 +76,7 @@ 442F6F8A24721523008F1101 /* PreferencesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreferencesViewController.swift; sourceTree = ""; }; 4438184D247DE31A009D9B3F /* AboutViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutViewController.swift; sourceTree = ""; }; 4438184F247DE41B009D9B3F /* AboutWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutWindowController.swift; sourceTree = ""; }; - 449395D22471ABD600FA0C34 /* PiBar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PiBar.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 449395D22471ABD600FA0C34 /* PiBar for macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "PiBar for macOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 449395D52471ABD600FA0C34 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 449395D92471ABD700FA0C34 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 449395DC2471ABD700FA0C34 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; @@ -74,15 +89,25 @@ 44B6DAF1247C70F500D364EC /* PiholeSettingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PiholeSettingsViewController.swift; sourceTree = ""; }; 44FFB091247627B100DCEDEC /* PiBarManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PiBarManager.swift; sourceTree = ""; }; A8CE572444810D388817476D /* Pods-PiBar.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PiBar.debug.xcconfig"; path = "Target Support Files/Pods-PiBar/Pods-PiBar.debug.xcconfig"; sourceTree = ""; }; + AB442844C550DE69A8DE1422 /* Pods_PiBar_for_macOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PiBar_for_macOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DCE170268940B6C31FF721B6 /* Pods-PiBar for macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PiBar for macOS.release.xcconfig"; path = "Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS.release.xcconfig"; sourceTree = ""; }; + FADC58092194CBF2E4F9D976 /* Pods-PiBar for macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PiBar for macOS.debug.xcconfig"; path = "Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 440DE45E2482D37C00C55354 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 449395CF2471ABD600FA0C34 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 441E78A9247E21DE00FBC7A0 /* LaunchAtLogin.framework in Frameworks */, - 32954590BDD997C520227DB6 /* Pods_PiBar.framework in Frameworks */, + D8E2BD45380E2681F4F7BF99 /* Pods_PiBar_for_macOS.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -94,10 +119,27 @@ children = ( A8CE572444810D388817476D /* Pods-PiBar.debug.xcconfig */, 08A4966FFD2196F42B1CA80F /* Pods-PiBar.release.xcconfig */, + FADC58092194CBF2E4F9D976 /* Pods-PiBar for macOS.debug.xcconfig */, + DCE170268940B6C31FF721B6 /* Pods-PiBar for macOS.release.xcconfig */, ); path = Pods; sourceTree = ""; }; + 440DE4622482D37D00C55354 /* PiBar for iOS */ = { + isa = PBXGroup; + children = ( + 440DE4632482D37D00C55354 /* AppDelegate.swift */, + 440DE4652482D37D00C55354 /* SceneDelegate.swift */, + 440DE4672482D37D00C55354 /* FirstViewController.swift */, + 440DE4692482D37D00C55354 /* SecondViewController.swift */, + 440DE46B2482D37D00C55354 /* Main.storyboard */, + 440DE46E2482D37D00C55354 /* Assets.xcassets */, + 440DE4702482D37D00C55354 /* LaunchScreen.storyboard */, + 440DE4732482D37D00C55354 /* Info.plist */, + ); + path = "PiBar for iOS"; + sourceTree = ""; + }; 4415D73224731E2F009E0B31 /* Data Sources */ = { isa = PBXGroup; children = ( @@ -161,7 +203,8 @@ isa = PBXGroup; children = ( 442F6F842471D334008F1101 /* README.md */, - 449395D42471ABD600FA0C34 /* PiBar */, + 449395D42471ABD600FA0C34 /* PiBar for macOS */, + 440DE4622482D37D00C55354 /* PiBar for iOS */, 449395D32471ABD600FA0C34 /* Products */, 214831E348424C32082556DF /* Pods */, 913B94517DDE1EF8E0C98FB2 /* Frameworks */, @@ -171,12 +214,13 @@ 449395D32471ABD600FA0C34 /* Products */ = { isa = PBXGroup; children = ( - 449395D22471ABD600FA0C34 /* PiBar.app */, + 449395D22471ABD600FA0C34 /* PiBar for macOS.app */, + 440DE4612482D37C00C55354 /* PiBar for iOS.app */, ); name = Products; sourceTree = ""; }; - 449395D42471ABD600FA0C34 /* PiBar */ = { + 449395D42471ABD600FA0C34 /* PiBar for macOS */ = { isa = PBXGroup; children = ( 449395DE2471ABD700FA0C34 /* Info.plist */, @@ -188,7 +232,7 @@ 441E78A6247DE6CB00FBC7A0 /* Views */, 44AC125F2476F1F300851ED9 /* Utilities */, ); - path = PiBar; + path = "PiBar for macOS"; sourceTree = ""; }; 449395E92471B10500FA0C34 /* Main Menu */ = { @@ -213,7 +257,7 @@ isa = PBXGroup; children = ( 441E78A8247E21DE00FBC7A0 /* LaunchAtLogin.framework */, - 04F07DFA596CEEEADF9A90A0 /* Pods_PiBar.framework */, + AB442844C550DE69A8DE1422 /* Pods_PiBar_for_macOS.framework */, ); name = Frameworks; sourceTree = ""; @@ -221,12 +265,29 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 449395D12471ABD600FA0C34 /* PiBar */ = { + 440DE4602482D37C00C55354 /* PiBar for iOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 449395E22471ABD700FA0C34 /* Build configuration list for PBXNativeTarget "PiBar" */; + buildConfigurationList = 440DE4742482D37D00C55354 /* Build configuration list for PBXNativeTarget "PiBar for iOS" */; + buildPhases = ( + 440DE45D2482D37C00C55354 /* Sources */, + 440DE45E2482D37C00C55354 /* Frameworks */, + 440DE45F2482D37C00C55354 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "PiBar for iOS"; + productName = "PiBar for iOS"; + productReference = 440DE4612482D37C00C55354 /* PiBar for iOS.app */; + productType = "com.apple.product-type.application"; + }; + 449395D12471ABD600FA0C34 /* PiBar for macOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 449395E22471ABD700FA0C34 /* Build configuration list for PBXNativeTarget "PiBar for macOS" */; buildPhases = ( - 44B6DAF3247CC9A000D364EC /* Increment Build Number */, 556BA81D41547EB1F3EC6986 /* [CP] Check Pods Manifest.lock */, + 44B6DAF3247CC9A000D364EC /* Increment Build Number */, 449395CE2471ABD600FA0C34 /* Sources */, 449395CF2471ABD600FA0C34 /* Frameworks */, 449395D02471ABD600FA0C34 /* Resources */, @@ -241,9 +302,9 @@ ); dependencies = ( ); - name = PiBar; + name = "PiBar for macOS"; productName = PiBar; - productReference = 449395D22471ABD600FA0C34 /* PiBar.app */; + productReference = 449395D22471ABD600FA0C34 /* PiBar for macOS.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -252,10 +313,13 @@ 449395CA2471ABD600FA0C34 /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 1140; + LastSwiftUpdateCheck = 1150; LastUpgradeCheck = 1140; ORGANIZATIONNAME = "Brad Root"; TargetAttributes = { + 440DE4602482D37C00C55354 = { + CreatedOnToolsVersion = 11.5; + }; 449395D12471ABD600FA0C34 = { CreatedOnToolsVersion = 11.4.1; }; @@ -274,12 +338,23 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 449395D12471ABD600FA0C34 /* PiBar */, + 449395D12471ABD600FA0C34 /* PiBar for macOS */, + 440DE4602482D37C00C55354 /* PiBar for iOS */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 440DE45F2482D37C00C55354 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 440DE4722482D37D00C55354 /* LaunchScreen.storyboard in Resources */, + 440DE46F2482D37D00C55354 /* Assets.xcassets in Resources */, + 440DE46D2482D37D00C55354 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 449395D02471ABD600FA0C34 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -398,7 +473,7 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-PiBar-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-PiBar for macOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -411,20 +486,31 @@ files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-PiBar/Pods-PiBar-frameworks-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-PiBar/Pods-PiBar-frameworks-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PiBar/Pods-PiBar-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 440DE45D2482D37C00C55354 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 440DE46A2482D37D00C55354 /* SecondViewController.swift in Sources */, + 440DE4682482D37D00C55354 /* FirstViewController.swift in Sources */, + 440DE4642482D37D00C55354 /* AppDelegate.swift in Sources */, + 440DE4662482D37D00C55354 /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 449395CE2471ABD600FA0C34 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -451,6 +537,22 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ + 440DE46B2482D37D00C55354 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 440DE46C2482D37D00C55354 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 440DE4702482D37D00C55354 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 440DE4712482D37D00C55354 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; 449395DB2471ABD700FA0C34 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( @@ -462,6 +564,47 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + 440DE4752482D37D00C55354 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 2Y9M69QJKZ; + INFOPLIST_FILE = "PiBar for iOS/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 13.5; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = net.amiantos.PiBar; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 440DE4762482D37D00C55354 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 2Y9M69QJKZ; + INFOPLIST_FILE = "PiBar for iOS/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 13.5; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = net.amiantos.PiBar; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; 449395E02471ABD700FA0C34 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -577,10 +720,10 @@ }; 449395E32471ABD700FA0C34 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A8CE572444810D388817476D /* Pods-PiBar.debug.xcconfig */; + baseConfigurationReference = FADC58092194CBF2E4F9D976 /* Pods-PiBar for macOS.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_ENTITLEMENTS = PiBar/PiBar.entitlements; + CODE_SIGN_ENTITLEMENTS = "PiBar for macOS/PiBar.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; @@ -591,7 +734,7 @@ "$(inherited)", "$(PROJECT_DIR)/Carthage/Build/Mac", ); - INFOPLIST_FILE = PiBar/Info.plist; + INFOPLIST_FILE = "PiBar for macOS/Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", @@ -606,10 +749,10 @@ }; 449395E42471ABD700FA0C34 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 08A4966FFD2196F42B1CA80F /* Pods-PiBar.release.xcconfig */; + baseConfigurationReference = DCE170268940B6C31FF721B6 /* Pods-PiBar for macOS.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_ENTITLEMENTS = PiBar/PiBar.entitlements; + CODE_SIGN_ENTITLEMENTS = "PiBar for macOS/PiBar.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; @@ -620,7 +763,7 @@ "$(inherited)", "$(PROJECT_DIR)/Carthage/Build/Mac", ); - INFOPLIST_FILE = PiBar/Info.plist; + INFOPLIST_FILE = "PiBar for macOS/Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", @@ -636,6 +779,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 440DE4742482D37D00C55354 /* Build configuration list for PBXNativeTarget "PiBar for iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 440DE4752482D37D00C55354 /* Debug */, + 440DE4762482D37D00C55354 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 449395CD2471ABD600FA0C34 /* Build configuration list for PBXProject "PiBar" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -645,7 +797,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 449395E22471ABD700FA0C34 /* Build configuration list for PBXNativeTarget "PiBar" */ = { + 449395E22471ABD700FA0C34 /* Build configuration list for PBXNativeTarget "PiBar for macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( 449395E32471ABD700FA0C34 /* Debug */, diff --git a/Podfile b/Podfile index 03ca86a..7486893 100644 --- a/Podfile +++ b/Podfile @@ -1,11 +1,7 @@ -# Uncomment the next line to define a global platform for your project -platform :osx, '10.12' - -target 'PiBar' do - # Comment the next line if you don't want to use dynamic frameworks +target 'PiBar for macOS' do + platform :osx, '10.12' use_frameworks! - # Pods for PiBar pod 'SwiftLint' pod 'HotKey' diff --git a/Podfile.lock b/Podfile.lock index 5287612..5497fb2 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -15,6 +15,6 @@ SPEC CHECKSUMS: HotKey: ad59450195936c10992438c4210f673de5aee43e SwiftLint: 22ccbbe3b8008684be5955693bab135e0ed6a447 -PODFILE CHECKSUM: bc53a454bd1292998c5646f550d93a401c3809d2 +PODFILE CHECKSUM: daaba820bd022a7fe651de8cba3e1d0268f9b367 COCOAPODS: 1.9.1 diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock index 5287612..5497fb2 100644 --- a/Pods/Manifest.lock +++ b/Pods/Manifest.lock @@ -15,6 +15,6 @@ SPEC CHECKSUMS: HotKey: ad59450195936c10992438c4210f673de5aee43e SwiftLint: 22ccbbe3b8008684be5955693bab135e0ed6a447 -PODFILE CHECKSUM: bc53a454bd1292998c5646f550d93a401c3809d2 +PODFILE CHECKSUM: daaba820bd022a7fe651de8cba3e1d0268f9b367 COCOAPODS: 1.9.1 diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj index 39edc50..ea17b08 100644 --- a/Pods/Pods.xcodeproj/project.pbxproj +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 51; objects = { /* Begin PBXAggregateTarget section */ @@ -20,76 +20,76 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ - 0DEDAE490C1A3FA9161CD695C0645004 /* Pods-PiBar-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F2A08F3DB0E5A7EB3AC5560E0B4B721 /* Pods-PiBar-dummy.m */; }; + 0F298D96C7737BBFECE455552B45C8F6 /* Pods-PiBar for macOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A7E8904EBC63E29FCF53E3F2EB48B9E2 /* Pods-PiBar for macOS-dummy.m */; }; 29784D27868C289298CBBC341C089C58 /* Key.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEA77483581310D677457C751AE34FE4 /* Key.swift */; }; 5AC7E7B8F7316B6F468E3A7919954BFB /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E0A08161AAA89131150FB117FA3FFD44 /* AppKit.framework */; }; 6329F2E68803BCDBFC3C3A48DF5109E3 /* HotKey-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CED4EFAB4A1A56BB51A65EDBB6CAF5E /* HotKey-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6E9A8A77A59B038DF2C2F205C90F6E7F /* Pods-PiBar for macOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1DC34C20AECDF8EF3603BB06247261C0 /* Pods-PiBar for macOS-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 753C094F16E687CC3C027B49F9A6DE3C /* HotKeysController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67FDD6B68A3C6BEFE01D5859A9C46AB5 /* HotKeysController.swift */; }; 9C995A1C6CEE3603CBD3C829D8ECEF8C /* HotKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7173204885C9B0546569E846A3DDAF6F /* HotKey.swift */; }; A3543A70DF8931D1D0C5FA57A6B0FB4B /* HotKey-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C9679204B9F60619EF9A77AC75DAD2A9 /* HotKey-dummy.m */; }; - A7CD375B656BAC38CD49FCF05366BA6E /* Pods-PiBar-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E0B1534582A88AC85E5869A791797730 /* Pods-PiBar-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; B1E75E67962EF3891467FAA026346869 /* NSEventModifierFlags+HotKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B791A837FA788207F296E05F0352D37 /* NSEventModifierFlags+HotKey.swift */; }; B690623CBB2C64D853AC854EA9B3DD60 /* KeyCombo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9079B716F46D611EBFE1541810454743 /* KeyCombo.swift */; }; - BB3AF94A65AEC246F6A55EF4C26B0C15 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 123D6DC4B5EFB570985CEFACFC1B93CE /* Cocoa.framework */; }; C0E9E705DDA754D6E1EC52A050650B70 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 123D6DC4B5EFB570985CEFACFC1B93CE /* Cocoa.framework */; }; + EFEFB6A3E88C77A17886DB3605CBF02E /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 123D6DC4B5EFB570985CEFACFC1B93CE /* Cocoa.framework */; }; F9FBEA632006006292C99342FF7CC2C9 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FFBC9A90999F22CE48B198862DFC5B5D /* Carbon.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 0F27C02292C675A2D7AF4DF1D1D00110 /* PBXContainerItemProxy */ = { + 296A912D2EE4E318F04768B786781245 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = 52B60EC2A583F24ACBB69C113F5488B9; - remoteInfo = SwiftLint; + remoteGlobalIDString = DB4D977E4336D9F2E9E510A33CD1DB6D; + remoteInfo = HotKey; }; - 8D7EB7FF347D5F06486B82FC5EF3E49C /* PBXContainerItemProxy */ = { + F4E3668BEE53E9EBC7FB7901DB77FF2B /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = DB4D977E4336D9F2E9E510A33CD1DB6D; - remoteInfo = HotKey; + remoteGlobalIDString = 52B60EC2A583F24ACBB69C113F5488B9; + remoteInfo = SwiftLint; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 123D6DC4B5EFB570985CEFACFC1B93CE /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; }; + 1DC34C20AECDF8EF3603BB06247261C0 /* Pods-PiBar for macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-PiBar for macOS-umbrella.h"; sourceTree = ""; }; 3189FE65632B209B3608F60B0CC63455 /* HotKey.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = HotKey.release.xcconfig; sourceTree = ""; }; 39D6FC83A74766CE2022EE87101A6CAE /* HotKey.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = HotKey.debug.xcconfig; sourceTree = ""; }; - 3C1FE6D309736C69BAF6F20B1F52D9BF /* Pods-PiBar-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-PiBar-frameworks.sh"; sourceTree = ""; }; - 4F2A08F3DB0E5A7EB3AC5560E0B4B721 /* Pods-PiBar-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-PiBar-dummy.m"; sourceTree = ""; }; - 5A2E111A2B15CDC74756281684BD9272 /* Pods-PiBar-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-PiBar-acknowledgements.plist"; sourceTree = ""; }; 5CED4EFAB4A1A56BB51A65EDBB6CAF5E /* HotKey-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "HotKey-umbrella.h"; sourceTree = ""; }; 67FDD6B68A3C6BEFE01D5859A9C46AB5 /* HotKeysController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HotKeysController.swift; path = Sources/HotKey/HotKeysController.swift; sourceTree = ""; }; - 716355C89B577E00268BBCDDABDD6654 /* Pods-PiBar-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-PiBar-acknowledgements.markdown"; sourceTree = ""; }; + 6835D4018E974B975B12ABD69DE9C10F /* Pods-PiBar for macOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-PiBar for macOS.modulemap"; sourceTree = ""; }; 7173204885C9B0546569E846A3DDAF6F /* HotKey.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HotKey.swift; path = Sources/HotKey/HotKey.swift; sourceTree = ""; }; 73C0DC168EBF587BFB7F868747092C0C /* HotKey-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "HotKey-Info.plist"; sourceTree = ""; }; - 7590F3CB1E12178036147CF9EE2744DF /* Pods-PiBar.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-PiBar.modulemap"; sourceTree = ""; }; + 7E24678C6B1E49C2024EC300DB731F51 /* Pods_PiBar_for_macOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PiBar_for_macOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 81966B134A506633F79975A8C1E4D473 /* Pods-PiBar for macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-PiBar for macOS.debug.xcconfig"; sourceTree = ""; }; 9079B716F46D611EBFE1541810454743 /* KeyCombo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KeyCombo.swift; path = Sources/HotKey/KeyCombo.swift; sourceTree = ""; }; - 93AE2864FC4C28D40DE2C9BDF459C9F2 /* Pods-PiBar-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-PiBar-Info.plist"; sourceTree = ""; }; + 9709167F964B43860D6650A29684E26D /* Pods-PiBar for macOS-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-PiBar for macOS-frameworks.sh"; sourceTree = ""; }; 9B791A837FA788207F296E05F0352D37 /* NSEventModifierFlags+HotKey.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSEventModifierFlags+HotKey.swift"; path = "Sources/HotKey/NSEventModifierFlags+HotKey.swift"; sourceTree = ""; }; 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - A362C7E6DCA3AA3091AAC7D820186A93 /* Pods_PiBar.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PiBar.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A7E8904EBC63E29FCF53E3F2EB48B9E2 /* Pods-PiBar for macOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-PiBar for macOS-dummy.m"; sourceTree = ""; }; + AF2584669C91BB2592F4E6C4AEA55030 /* Pods-PiBar for macOS-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-PiBar for macOS-acknowledgements.plist"; sourceTree = ""; }; B7BA1985099662EC8D4524DE90B39F70 /* HotKey.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = HotKey.modulemap; sourceTree = ""; }; C45D6A9423CD5A65CB89B7FAB8572897 /* SwiftLint.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftLint.debug.xcconfig; sourceTree = ""; }; C9679204B9F60619EF9A77AC75DAD2A9 /* HotKey-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "HotKey-dummy.m"; sourceTree = ""; }; - CDE189E76FE5BFB347A2E8F628AF8188 /* Pods-PiBar.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-PiBar.release.xcconfig"; sourceTree = ""; }; E0A08161AAA89131150FB117FA3FFD44 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework; sourceTree = DEVELOPER_DIR; }; - E0B1534582A88AC85E5869A791797730 /* Pods-PiBar-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-PiBar-umbrella.h"; sourceTree = ""; }; E2CD43DAA14458EE1E23C193BD29E52D /* SwiftLint.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftLint.release.xcconfig; sourceTree = ""; }; EEA77483581310D677457C751AE34FE4 /* Key.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Key.swift; path = Sources/HotKey/Key.swift; sourceTree = ""; }; + F1B08CC90FD7A58259F8440A78D2A56D /* Pods-PiBar for macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-PiBar for macOS.release.xcconfig"; sourceTree = ""; }; + F2D97705127F32D4E29E70B3CE90CA91 /* Pods-PiBar for macOS-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-PiBar for macOS-acknowledgements.markdown"; sourceTree = ""; }; F36B2E7BB4C3E92E4DF7443FAFF3AE3F /* HotKey.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HotKey.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - FAC1F45CCB8C15294E87E77FEA979581 /* Pods-PiBar.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-PiBar.debug.xcconfig"; sourceTree = ""; }; + FDDFCC73A543B47963B53D40130F530B /* Pods-PiBar for macOS-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-PiBar for macOS-Info.plist"; sourceTree = ""; }; FEE6DE741C3E6CB6301400B27B46AF00 /* HotKey-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "HotKey-prefix.pch"; sourceTree = ""; }; FFBC9A90999F22CE48B198862DFC5B5D /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework; sourceTree = DEVELOPER_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - AC925B3BC8F8597F439F47602934FE1D /* Frameworks */ = { + D9A5E0A2C4AD4F6036B97A3054819A6A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - BB3AF94A65AEC246F6A55EF4C26B0C15 /* Cocoa.framework in Frameworks */, + EFEFB6A3E88C77A17886DB3605CBF02E /* Cocoa.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -106,37 +106,21 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 23A5D522D1275959966E7848A1E5D2F8 /* SwiftLint */ = { + 0A170B55082C704562CF1F98AD28D6FE /* Products */ = { isa = PBXGroup; children = ( - 958749A3BA8E2558B8F215BA5709B7A4 /* Support Files */, + F36B2E7BB4C3E92E4DF7443FAFF3AE3F /* HotKey.framework */, + 7E24678C6B1E49C2024EC300DB731F51 /* Pods_PiBar_for_macOS.framework */, ); - path = SwiftLint; + name = Products; sourceTree = ""; }; - 2E143565E9FB4296D543F043709F30CD /* Targets Support Files */ = { + 23A5D522D1275959966E7848A1E5D2F8 /* SwiftLint */ = { isa = PBXGroup; children = ( - 73A089C2473AC13F896B4AE663481768 /* Pods-PiBar */, + 958749A3BA8E2558B8F215BA5709B7A4 /* Support Files */, ); - name = "Targets Support Files"; - sourceTree = ""; - }; - 73A089C2473AC13F896B4AE663481768 /* Pods-PiBar */ = { - isa = PBXGroup; - children = ( - 7590F3CB1E12178036147CF9EE2744DF /* Pods-PiBar.modulemap */, - 716355C89B577E00268BBCDDABDD6654 /* Pods-PiBar-acknowledgements.markdown */, - 5A2E111A2B15CDC74756281684BD9272 /* Pods-PiBar-acknowledgements.plist */, - 4F2A08F3DB0E5A7EB3AC5560E0B4B721 /* Pods-PiBar-dummy.m */, - 3C1FE6D309736C69BAF6F20B1F52D9BF /* Pods-PiBar-frameworks.sh */, - 93AE2864FC4C28D40DE2C9BDF459C9F2 /* Pods-PiBar-Info.plist */, - E0B1534582A88AC85E5869A791797730 /* Pods-PiBar-umbrella.h */, - FAC1F45CCB8C15294E87E77FEA979581 /* Pods-PiBar.debug.xcconfig */, - CDE189E76FE5BFB347A2E8F628AF8188 /* Pods-PiBar.release.xcconfig */, - ); - name = "Pods-PiBar"; - path = "Target Support Files/Pods-PiBar"; + path = SwiftLint; sourceTree = ""; }; 867952DE18004326E1A758FDBA0A19DC /* OS X */ = { @@ -149,6 +133,23 @@ name = "OS X"; sourceTree = ""; }; + 8AFC5830511D6209DC0C6FA4767C0233 /* Pods-PiBar for macOS */ = { + isa = PBXGroup; + children = ( + 6835D4018E974B975B12ABD69DE9C10F /* Pods-PiBar for macOS.modulemap */, + F2D97705127F32D4E29E70B3CE90CA91 /* Pods-PiBar for macOS-acknowledgements.markdown */, + AF2584669C91BB2592F4E6C4AEA55030 /* Pods-PiBar for macOS-acknowledgements.plist */, + A7E8904EBC63E29FCF53E3F2EB48B9E2 /* Pods-PiBar for macOS-dummy.m */, + 9709167F964B43860D6650A29684E26D /* Pods-PiBar for macOS-frameworks.sh */, + FDDFCC73A543B47963B53D40130F530B /* Pods-PiBar for macOS-Info.plist */, + 1DC34C20AECDF8EF3603BB06247261C0 /* Pods-PiBar for macOS-umbrella.h */, + 81966B134A506633F79975A8C1E4D473 /* Pods-PiBar for macOS.debug.xcconfig */, + F1B08CC90FD7A58259F8440A78D2A56D /* Pods-PiBar for macOS.release.xcconfig */, + ); + name = "Pods-PiBar for macOS"; + path = "Target Support Files/Pods-PiBar for macOS"; + sourceTree = ""; + }; 958749A3BA8E2558B8F215BA5709B7A4 /* Support Files */ = { isa = PBXGroup; children = ( @@ -159,15 +160,6 @@ path = "../Target Support Files/SwiftLint"; sourceTree = ""; }; - 9964B96653A59F2D338403CB3AFF245A /* Products */ = { - isa = PBXGroup; - children = ( - F36B2E7BB4C3E92E4DF7443FAFF3AE3F /* HotKey.framework */, - A362C7E6DCA3AA3091AAC7D820186A93 /* Pods_PiBar.framework */, - ); - name = Products; - sourceTree = ""; - }; A3CDB250FFEFB42CA2C68F1FBD92997D /* Frameworks */ = { isa = PBXGroup; children = ( @@ -189,14 +181,22 @@ path = HotKey; sourceTree = ""; }; + CA827CEEF79D6ADB917731818BEAD561 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + 8AFC5830511D6209DC0C6FA4767C0233 /* Pods-PiBar for macOS */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; CF1408CF629C7361332E53B88F7BD30C = { isa = PBXGroup; children = ( 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, A3CDB250FFEFB42CA2C68F1FBD92997D /* Frameworks */, E7B6D3933FA52A78D67127559530B1D3 /* Pods */, - 9964B96653A59F2D338403CB3AFF245A /* Products */, - 2E143565E9FB4296D543F043709F30CD /* Targets Support Files */, + 0A170B55082C704562CF1F98AD28D6FE /* Products */, + CA827CEEF79D6ADB917731818BEAD561 /* Targets Support Files */, ); sourceTree = ""; }; @@ -227,11 +227,11 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 3337D2EA488A4D285D9488F94E1BAC50 /* Headers */ = { + 1FD3EC579B39BB88D73EBCCBB362C47E /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - A7CD375B656BAC38CD49FCF05366BA6E /* Pods-PiBar-umbrella.h in Headers */, + 6E9A8A77A59B038DF2C2F205C90F6E7F /* Pods-PiBar for macOS-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -246,42 +246,42 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - DB4D977E4336D9F2E9E510A33CD1DB6D /* HotKey */ = { + 40BD49D951E170B506897E8C3C0C2B06 /* Pods-PiBar for macOS */ = { isa = PBXNativeTarget; - buildConfigurationList = A7CF4E656A9E7278BE7AD5E48841412E /* Build configuration list for PBXNativeTarget "HotKey" */; + buildConfigurationList = 1CC4C317C766DD064AA741A20D927C75 /* Build configuration list for PBXNativeTarget "Pods-PiBar for macOS" */; buildPhases = ( - F86CE60BF1555823DE98BC5D4354F297 /* Headers */, - 7CBB17719916DF3020AE21CEEA3DD91C /* Sources */, - EC969627A44DD839E017AD83678B6FF2 /* Frameworks */, - B29C2900C4DEA03C97EAAA1E92F0C9FE /* Resources */, + 1FD3EC579B39BB88D73EBCCBB362C47E /* Headers */, + F27386777708C26A4CF4638EEF01133D /* Sources */, + D9A5E0A2C4AD4F6036B97A3054819A6A /* Frameworks */, + DC6FCD1B7258FB9F8A20009D708750B5 /* Resources */, ); buildRules = ( ); dependencies = ( + A391A4268F0B442046C55DBEE5BD5ADC /* PBXTargetDependency */, + 5F932A5852941201FF95C75B3B06FBFD /* PBXTargetDependency */, ); - name = HotKey; - productName = HotKey; - productReference = F36B2E7BB4C3E92E4DF7443FAFF3AE3F /* HotKey.framework */; + name = "Pods-PiBar for macOS"; + productName = "Pods-PiBar for macOS"; + productReference = 7E24678C6B1E49C2024EC300DB731F51 /* Pods_PiBar_for_macOS.framework */; productType = "com.apple.product-type.framework"; }; - DF53168522C323A8F566844912454C62 /* Pods-PiBar */ = { + DB4D977E4336D9F2E9E510A33CD1DB6D /* HotKey */ = { isa = PBXNativeTarget; - buildConfigurationList = A01C1C8DBC6317058BC3DD33267DEC71 /* Build configuration list for PBXNativeTarget "Pods-PiBar" */; + buildConfigurationList = A7CF4E656A9E7278BE7AD5E48841412E /* Build configuration list for PBXNativeTarget "HotKey" */; buildPhases = ( - 3337D2EA488A4D285D9488F94E1BAC50 /* Headers */, - 4FC33F73A6A09E8B0782C3AE6534A57C /* Sources */, - AC925B3BC8F8597F439F47602934FE1D /* Frameworks */, - 61E06547E7192436AE2CF4AE5A7E07EE /* Resources */, + F86CE60BF1555823DE98BC5D4354F297 /* Headers */, + 7CBB17719916DF3020AE21CEEA3DD91C /* Sources */, + EC969627A44DD839E017AD83678B6FF2 /* Frameworks */, + B29C2900C4DEA03C97EAAA1E92F0C9FE /* Resources */, ); buildRules = ( ); dependencies = ( - FADB4F9C9BC5AF6DC4A42DB414045E59 /* PBXTargetDependency */, - D062C18277883D7A34033314383198E7 /* PBXTargetDependency */, ); - name = "Pods-PiBar"; - productName = "Pods-PiBar"; - productReference = A362C7E6DCA3AA3091AAC7D820186A93 /* Pods_PiBar.framework */; + name = HotKey; + productName = HotKey; + productReference = F36B2E7BB4C3E92E4DF7443FAFF3AE3F /* HotKey.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ @@ -294,7 +294,7 @@ LastUpgradeCheck = 1150; }; buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; - compatibilityVersion = "Xcode 9.3"; + compatibilityVersion = "Xcode 10.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( @@ -302,26 +302,26 @@ Base, ); mainGroup = CF1408CF629C7361332E53B88F7BD30C; - productRefGroup = 9964B96653A59F2D338403CB3AFF245A /* Products */; + productRefGroup = 0A170B55082C704562CF1F98AD28D6FE /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( DB4D977E4336D9F2E9E510A33CD1DB6D /* HotKey */, - DF53168522C323A8F566844912454C62 /* Pods-PiBar */, + 40BD49D951E170B506897E8C3C0C2B06 /* Pods-PiBar for macOS */, 52B60EC2A583F24ACBB69C113F5488B9 /* SwiftLint */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 61E06547E7192436AE2CF4AE5A7E07EE /* Resources */ = { + B29C2900C4DEA03C97EAAA1E92F0C9FE /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - B29C2900C4DEA03C97EAAA1E92F0C9FE /* Resources */ = { + DC6FCD1B7258FB9F8A20009D708750B5 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -331,14 +331,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 4FC33F73A6A09E8B0782C3AE6534A57C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 0DEDAE490C1A3FA9161CD695C0645004 /* Pods-PiBar-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 7CBB17719916DF3020AE21CEEA3DD91C /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -352,20 +344,28 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + F27386777708C26A4CF4638EEF01133D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0F298D96C7737BBFECE455552B45C8F6 /* Pods-PiBar for macOS-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - D062C18277883D7A34033314383198E7 /* PBXTargetDependency */ = { + 5F932A5852941201FF95C75B3B06FBFD /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = SwiftLint; target = 52B60EC2A583F24ACBB69C113F5488B9 /* SwiftLint */; - targetProxy = 0F27C02292C675A2D7AF4DF1D1D00110 /* PBXContainerItemProxy */; + targetProxy = F4E3668BEE53E9EBC7FB7901DB77FF2B /* PBXContainerItemProxy */; }; - FADB4F9C9BC5AF6DC4A42DB414045E59 /* PBXTargetDependency */ = { + A391A4268F0B442046C55DBEE5BD5ADC /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = HotKey; target = DB4D977E4336D9F2E9E510A33CD1DB6D /* HotKey */; - targetProxy = 8D7EB7FF347D5F06486B82FC5EF3E49C /* PBXContainerItemProxy */; + targetProxy = 296A912D2EE4E318F04768B786781245 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -483,9 +483,9 @@ }; name = Release; }; - 6F01B14518E78EDCE50F83DD8D67019B /* Release */ = { + 52802DA8CAA05BDBB53BECEBF1C9034C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = CDE189E76FE5BFB347A2E8F628AF8188 /* Pods-PiBar.release.xcconfig */; + baseConfigurationReference = F1B08CC90FD7A58259F8440A78D2A56D /* Pods-PiBar for macOS.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CLANG_ENABLE_OBJC_WEAK = NO; @@ -500,7 +500,7 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; - INFOPLIST_FILE = "Target Support Files/Pods-PiBar/Pods-PiBar-Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -509,7 +509,7 @@ ); MACH_O_TYPE = staticlib; MACOSX_DEPLOYMENT_TARGET = 10.12; - MODULEMAP_FILE = "Target Support Files/Pods-PiBar/Pods-PiBar.modulemap"; + MODULEMAP_FILE = "Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; @@ -586,9 +586,9 @@ }; name = Debug; }; - B290702DE9ACC00B7D5B722D65FA85F2 /* Debug */ = { + B1E67E4F57E6461DF25834644F842098 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FAC1F45CCB8C15294E87E77FEA979581 /* Pods-PiBar.debug.xcconfig */; + baseConfigurationReference = 81966B134A506633F79975A8C1E4D473 /* Pods-PiBar for macOS.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CLANG_ENABLE_OBJC_WEAK = NO; @@ -603,7 +603,7 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; - INFOPLIST_FILE = "Target Support Files/Pods-PiBar/Pods-PiBar-Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -612,7 +612,7 @@ ); MACH_O_TYPE = staticlib; MACOSX_DEPLOYMENT_TARGET = 10.12; - MODULEMAP_FILE = "Target Support Files/Pods-PiBar/Pods-PiBar.modulemap"; + MODULEMAP_FILE = "Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; @@ -681,20 +681,20 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { + 1CC4C317C766DD064AA741A20D927C75 /* Build configuration list for PBXNativeTarget "Pods-PiBar for macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 816C679D58750316935F7386A438309D /* Debug */, - 2AE0D8B39827576460938522CAB2F560 /* Release */, + B1E67E4F57E6461DF25834644F842098 /* Debug */, + 52802DA8CAA05BDBB53BECEBF1C9034C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A01C1C8DBC6317058BC3DD33267DEC71 /* Build configuration list for PBXNativeTarget "Pods-PiBar" */ = { + 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - B290702DE9ACC00B7D5B722D65FA85F2 /* Debug */, - 6F01B14518E78EDCE50F83DD8D67019B /* Release */, + 816C679D58750316935F7386A438309D /* Debug */, + 2AE0D8B39827576460938522CAB2F560 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Pods/Target Support Files/Pods-PiBar/Pods-PiBar-Info.plist b/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-Info.plist similarity index 100% rename from Pods/Target Support Files/Pods-PiBar/Pods-PiBar-Info.plist rename to Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-Info.plist diff --git a/Pods/Target Support Files/Pods-PiBar/Pods-PiBar-acknowledgements.markdown b/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-acknowledgements.markdown similarity index 100% rename from Pods/Target Support Files/Pods-PiBar/Pods-PiBar-acknowledgements.markdown rename to Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-acknowledgements.markdown diff --git a/Pods/Target Support Files/Pods-PiBar/Pods-PiBar-acknowledgements.plist b/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-acknowledgements.plist similarity index 100% rename from Pods/Target Support Files/Pods-PiBar/Pods-PiBar-acknowledgements.plist rename to Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-acknowledgements.plist diff --git a/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-dummy.m b/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-dummy.m new file mode 100644 index 0000000..b2f8509 --- /dev/null +++ b/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_PiBar_for_macOS : NSObject +@end +@implementation PodsDummy_Pods_PiBar_for_macOS +@end diff --git a/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks-Debug-input-files.xcfilelist b/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks-Debug-input-files.xcfilelist new file mode 100644 index 0000000..d14e2a0 --- /dev/null +++ b/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks-Debug-input-files.xcfilelist @@ -0,0 +1,2 @@ +${PODS_ROOT}/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks.sh +${BUILT_PRODUCTS_DIR}/HotKey/HotKey.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-PiBar/Pods-PiBar-frameworks-Debug-output-files.xcfilelist b/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks-Debug-output-files.xcfilelist similarity index 100% rename from Pods/Target Support Files/Pods-PiBar/Pods-PiBar-frameworks-Debug-output-files.xcfilelist rename to Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks-Debug-output-files.xcfilelist diff --git a/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks-Release-input-files.xcfilelist b/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks-Release-input-files.xcfilelist new file mode 100644 index 0000000..d14e2a0 --- /dev/null +++ b/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks-Release-input-files.xcfilelist @@ -0,0 +1,2 @@ +${PODS_ROOT}/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks.sh +${BUILT_PRODUCTS_DIR}/HotKey/HotKey.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-PiBar/Pods-PiBar-frameworks-Release-output-files.xcfilelist b/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks-Release-output-files.xcfilelist similarity index 100% rename from Pods/Target Support Files/Pods-PiBar/Pods-PiBar-frameworks-Release-output-files.xcfilelist rename to Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks-Release-output-files.xcfilelist diff --git a/Pods/Target Support Files/Pods-PiBar/Pods-PiBar-frameworks.sh b/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks.sh similarity index 100% rename from Pods/Target Support Files/Pods-PiBar/Pods-PiBar-frameworks.sh rename to Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-frameworks.sh diff --git a/Pods/Target Support Files/Pods-PiBar/Pods-PiBar-umbrella.h b/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-umbrella.h similarity index 59% rename from Pods/Target Support Files/Pods-PiBar/Pods-PiBar-umbrella.h rename to Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-umbrella.h index ccea7d1..e3fe2d3 100644 --- a/Pods/Target Support Files/Pods-PiBar/Pods-PiBar-umbrella.h +++ b/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS-umbrella.h @@ -11,6 +11,6 @@ #endif -FOUNDATION_EXPORT double Pods_PiBarVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_PiBarVersionString[]; +FOUNDATION_EXPORT double Pods_PiBar_for_macOSVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_PiBar_for_macOSVersionString[]; diff --git a/Pods/Target Support Files/Pods-PiBar/Pods-PiBar.debug.xcconfig b/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS.debug.xcconfig similarity index 100% rename from Pods/Target Support Files/Pods-PiBar/Pods-PiBar.debug.xcconfig rename to Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS.debug.xcconfig diff --git a/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS.modulemap b/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS.modulemap new file mode 100644 index 0000000..88313f0 --- /dev/null +++ b/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS.modulemap @@ -0,0 +1,6 @@ +framework module Pods_PiBar_for_macOS { + umbrella header "Pods-PiBar for macOS-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/Pods-PiBar/Pods-PiBar.release.xcconfig b/Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS.release.xcconfig similarity index 100% rename from Pods/Target Support Files/Pods-PiBar/Pods-PiBar.release.xcconfig rename to Pods/Target Support Files/Pods-PiBar for macOS/Pods-PiBar for macOS.release.xcconfig diff --git a/Pods/Target Support Files/Pods-PiBar/Pods-PiBar-dummy.m b/Pods/Target Support Files/Pods-PiBar/Pods-PiBar-dummy.m deleted file mode 100644 index c449519..0000000 --- a/Pods/Target Support Files/Pods-PiBar/Pods-PiBar-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_PiBar : NSObject -@end -@implementation PodsDummy_Pods_PiBar -@end diff --git a/Pods/Target Support Files/Pods-PiBar/Pods-PiBar-frameworks-Debug-input-files.xcfilelist b/Pods/Target Support Files/Pods-PiBar/Pods-PiBar-frameworks-Debug-input-files.xcfilelist deleted file mode 100644 index 99bf26d..0000000 --- a/Pods/Target Support Files/Pods-PiBar/Pods-PiBar-frameworks-Debug-input-files.xcfilelist +++ /dev/null @@ -1,2 +0,0 @@ -${PODS_ROOT}/Target Support Files/Pods-PiBar/Pods-PiBar-frameworks.sh -${BUILT_PRODUCTS_DIR}/HotKey/HotKey.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-PiBar/Pods-PiBar-frameworks-Release-input-files.xcfilelist b/Pods/Target Support Files/Pods-PiBar/Pods-PiBar-frameworks-Release-input-files.xcfilelist deleted file mode 100644 index 99bf26d..0000000 --- a/Pods/Target Support Files/Pods-PiBar/Pods-PiBar-frameworks-Release-input-files.xcfilelist +++ /dev/null @@ -1,2 +0,0 @@ -${PODS_ROOT}/Target Support Files/Pods-PiBar/Pods-PiBar-frameworks.sh -${BUILT_PRODUCTS_DIR}/HotKey/HotKey.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-PiBar/Pods-PiBar.modulemap b/Pods/Target Support Files/Pods-PiBar/Pods-PiBar.modulemap deleted file mode 100644 index 304c81f..0000000 --- a/Pods/Target Support Files/Pods-PiBar/Pods-PiBar.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_PiBar { - umbrella header "Pods-PiBar-umbrella.h" - - export * - module * { export * } -} From 068a64873733d9b3e9387ef4d0a1dd6f08eef00f Mon Sep 17 00:00:00 2001 From: Brad Root Date: Sat, 30 May 2020 11:00:16 -0700 Subject: [PATCH 02/58] move shared files to a separate group and get building PiholeAPI to work on iOS --- .../Data Sources/PiholeAPI.swift | 12 ++++--- .../Data Sources/Preferences.swift | 0 .../Data Sources/Structs.swift | 0 .../Manager/Operations/AsyncOperation.swift | 0 .../ChangePiholeStatusOperation.swift | 0 .../Operations/UpdatePiholeOperation.swift | 0 .../Manager/PiBarManager.swift | 0 .../Utilities/Extensions.swift | 0 .../Utilities/Logging.swift | 0 PiBar for macOS/Info.plist | 2 +- PiBar.xcodeproj/project.pbxproj | 32 +++++++++++++++++-- 11 files changed, 37 insertions(+), 9 deletions(-) rename {PiBar for macOS => PiBar Shared}/Data Sources/PiholeAPI.swift (98%) rename {PiBar for macOS => PiBar Shared}/Data Sources/Preferences.swift (100%) rename {PiBar for macOS => PiBar Shared}/Data Sources/Structs.swift (100%) rename {PiBar for macOS => PiBar Shared}/Manager/Operations/AsyncOperation.swift (100%) rename {PiBar for macOS => PiBar Shared}/Manager/Operations/ChangePiholeStatusOperation.swift (100%) rename {PiBar for macOS => PiBar Shared}/Manager/Operations/UpdatePiholeOperation.swift (100%) rename {PiBar for macOS => PiBar Shared}/Manager/PiBarManager.swift (100%) rename {PiBar for macOS => PiBar Shared}/Utilities/Extensions.swift (100%) rename {PiBar for macOS => PiBar Shared}/Utilities/Logging.swift (100%) diff --git a/PiBar for macOS/Data Sources/PiholeAPI.swift b/PiBar Shared/Data Sources/PiholeAPI.swift similarity index 98% rename from PiBar for macOS/Data Sources/PiholeAPI.swift rename to PiBar Shared/Data Sources/PiholeAPI.swift index 75495b3..2cbc46b 100644 --- a/PiBar for macOS/Data Sources/PiholeAPI.swift +++ b/PiBar Shared/Data Sources/PiholeAPI.swift @@ -9,9 +9,13 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. -import Cocoa +#if os(macOS) + import Cocoa +#elseif os(iOS) + import UIKit +#endif -class PiholeAPI: NSObject { +final class PiholeAPI { let connection: PiholeConnectionV2 var identifier: String { @@ -31,7 +35,7 @@ class PiholeAPI: NSObject { static let recentBlocked = PiholeAPIEndpoint(queryParameter: "recentBlocked", authorizationRequired: false) } - override init() { + init() { connection = PiholeConnectionV2( hostname: "pi.hole", port: 80, @@ -40,12 +44,10 @@ class PiholeAPI: NSObject { passwordProtected: true, adminPanelURL: "http://pi.hole/admin/" ) - super.init() } init(connection: PiholeConnectionV2) { self.connection = connection - super.init() } private func get(_ endpoint: PiholeAPIEndpoint, argument: String? = nil, completion: @escaping (String?) -> Void) { diff --git a/PiBar for macOS/Data Sources/Preferences.swift b/PiBar Shared/Data Sources/Preferences.swift similarity index 100% rename from PiBar for macOS/Data Sources/Preferences.swift rename to PiBar Shared/Data Sources/Preferences.swift diff --git a/PiBar for macOS/Data Sources/Structs.swift b/PiBar Shared/Data Sources/Structs.swift similarity index 100% rename from PiBar for macOS/Data Sources/Structs.swift rename to PiBar Shared/Data Sources/Structs.swift diff --git a/PiBar for macOS/Manager/Operations/AsyncOperation.swift b/PiBar Shared/Manager/Operations/AsyncOperation.swift similarity index 100% rename from PiBar for macOS/Manager/Operations/AsyncOperation.swift rename to PiBar Shared/Manager/Operations/AsyncOperation.swift diff --git a/PiBar for macOS/Manager/Operations/ChangePiholeStatusOperation.swift b/PiBar Shared/Manager/Operations/ChangePiholeStatusOperation.swift similarity index 100% rename from PiBar for macOS/Manager/Operations/ChangePiholeStatusOperation.swift rename to PiBar Shared/Manager/Operations/ChangePiholeStatusOperation.swift diff --git a/PiBar for macOS/Manager/Operations/UpdatePiholeOperation.swift b/PiBar Shared/Manager/Operations/UpdatePiholeOperation.swift similarity index 100% rename from PiBar for macOS/Manager/Operations/UpdatePiholeOperation.swift rename to PiBar Shared/Manager/Operations/UpdatePiholeOperation.swift diff --git a/PiBar for macOS/Manager/PiBarManager.swift b/PiBar Shared/Manager/PiBarManager.swift similarity index 100% rename from PiBar for macOS/Manager/PiBarManager.swift rename to PiBar Shared/Manager/PiBarManager.swift diff --git a/PiBar for macOS/Utilities/Extensions.swift b/PiBar Shared/Utilities/Extensions.swift similarity index 100% rename from PiBar for macOS/Utilities/Extensions.swift rename to PiBar Shared/Utilities/Extensions.swift diff --git a/PiBar for macOS/Utilities/Logging.swift b/PiBar Shared/Utilities/Logging.swift similarity index 100% rename from PiBar for macOS/Utilities/Logging.swift rename to PiBar Shared/Utilities/Logging.swift diff --git a/PiBar for macOS/Info.plist b/PiBar for macOS/Info.plist index f02d185..30d9963 100644 --- a/PiBar for macOS/Info.plist +++ b/PiBar for macOS/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 672 + 674 LSApplicationCategoryType public.app-category.utilities LSMinimumSystemVersion diff --git a/PiBar.xcodeproj/project.pbxproj b/PiBar.xcodeproj/project.pbxproj index 0a72673..aaefd91 100644 --- a/PiBar.xcodeproj/project.pbxproj +++ b/PiBar.xcodeproj/project.pbxproj @@ -14,6 +14,15 @@ 440DE46D2482D37D00C55354 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 440DE46B2482D37D00C55354 /* Main.storyboard */; }; 440DE46F2482D37D00C55354 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 440DE46E2482D37D00C55354 /* Assets.xcassets */; }; 440DE4722482D37D00C55354 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 440DE4702482D37D00C55354 /* LaunchScreen.storyboard */; }; + 440DE4782482D58B00C55354 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 442F6F862471E8DF008F1101 /* Extensions.swift */; }; + 440DE4792482D58D00C55354 /* Logging.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4415D73524747331009E0B31 /* Logging.swift */; }; + 440DE47A2482D59000C55354 /* Structs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4415D73324731FE0009E0B31 /* Structs.swift */; }; + 440DE47B2482D59300C55354 /* PiholeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 449395ED2471C47F00FA0C34 /* PiholeAPI.swift */; }; + 440DE47C2482D59500C55354 /* Preferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = 442F6F88247212D1008F1101 /* Preferences.swift */; }; + 440DE47D2482D59900C55354 /* PiBarManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44FFB091247627B100DCEDEC /* PiBarManager.swift */; }; + 440DE47E2482D59C00C55354 /* AsyncOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441E78AD247E3AF300FBC7A0 /* AsyncOperation.swift */; }; + 440DE47F2482D59F00C55354 /* UpdatePiholeOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441E78AF247E3BC500FBC7A0 /* UpdatePiholeOperation.swift */; }; + 440DE4802482D5A100C55354 /* ChangePiholeStatusOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441E78B3247E3F9400FBC7A0 /* ChangePiholeStatusOperation.swift */; }; 4415D73424731FE0009E0B31 /* Structs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4415D73324731FE0009E0B31 /* Structs.swift */; }; 4415D73624747331009E0B31 /* Logging.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4415D73524747331009E0B31 /* Logging.swift */; }; 441E78A9247E21DE00FBC7A0 /* LaunchAtLogin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 441E78A8247E21DE00FBC7A0 /* LaunchAtLogin.framework */; }; @@ -140,6 +149,16 @@ path = "PiBar for iOS"; sourceTree = ""; }; + 440DE4772482D54E00C55354 /* PiBar Shared */ = { + isa = PBXGroup; + children = ( + 441E78B2247E3ED700FBC7A0 /* Manager */, + 4415D73224731E2F009E0B31 /* Data Sources */, + 44AC125F2476F1F300851ED9 /* Utilities */, + ); + path = "PiBar Shared"; + sourceTree = ""; + }; 4415D73224731E2F009E0B31 /* Data Sources */ = { isa = PBXGroup; children = ( @@ -203,6 +222,7 @@ isa = PBXGroup; children = ( 442F6F842471D334008F1101 /* README.md */, + 440DE4772482D54E00C55354 /* PiBar Shared */, 449395D42471ABD600FA0C34 /* PiBar for macOS */, 440DE4622482D37D00C55354 /* PiBar for iOS */, 449395D32471ABD600FA0C34 /* Products */, @@ -227,10 +247,7 @@ 449395DF2471ABD700FA0C34 /* PiBar.entitlements */, 449395D92471ABD700FA0C34 /* Assets.xcassets */, 449395D52471ABD600FA0C34 /* AppDelegate.swift */, - 441E78B2247E3ED700FBC7A0 /* Manager */, - 4415D73224731E2F009E0B31 /* Data Sources */, 441E78A6247DE6CB00FBC7A0 /* Views */, - 44AC125F2476F1F300851ED9 /* Utilities */, ); path = "PiBar for macOS"; sourceTree = ""; @@ -504,10 +521,19 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 440DE4782482D58B00C55354 /* Extensions.swift in Sources */, + 440DE47E2482D59C00C55354 /* AsyncOperation.swift in Sources */, + 440DE4792482D58D00C55354 /* Logging.swift in Sources */, 440DE46A2482D37D00C55354 /* SecondViewController.swift in Sources */, + 440DE47A2482D59000C55354 /* Structs.swift in Sources */, 440DE4682482D37D00C55354 /* FirstViewController.swift in Sources */, + 440DE47B2482D59300C55354 /* PiholeAPI.swift in Sources */, + 440DE47F2482D59F00C55354 /* UpdatePiholeOperation.swift in Sources */, + 440DE47D2482D59900C55354 /* PiBarManager.swift in Sources */, 440DE4642482D37D00C55354 /* AppDelegate.swift in Sources */, + 440DE4802482D5A100C55354 /* ChangePiholeStatusOperation.swift in Sources */, 440DE4662482D37D00C55354 /* SceneDelegate.swift in Sources */, + 440DE47C2482D59500C55354 /* Preferences.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; From a078fe9e027a01cc8691db1e671c7064f54a497b Mon Sep 17 00:00:00 2001 From: Brad Root Date: Sat, 30 May 2020 11:06:51 -0700 Subject: [PATCH 03/58] mysterious storyboard changes --- PiBar for iOS/Base.lproj/Main.storyboard | 29 ++++++++++++------------ 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/PiBar for iOS/Base.lproj/Main.storyboard b/PiBar for iOS/Base.lproj/Main.storyboard index 7a85710..45d7dc5 100644 --- a/PiBar for iOS/Base.lproj/Main.storyboard +++ b/PiBar for iOS/Base.lproj/Main.storyboard @@ -1,7 +1,8 @@ - + + - + @@ -9,24 +10,24 @@ - + - + - + @@ -44,24 +45,24 @@ - + - + - + From 8dd099c8bccbd50319dc5e81098abb6264ce9f43 Mon Sep 17 00:00:00 2001 From: Brad Root Date: Sat, 30 May 2020 11:21:30 -0700 Subject: [PATCH 04/58] lower iOS deployment target to 11.4 --- .../Views/Base.lproj/Main.storyboard | 26 +++++++++---------- PiBar.xcodeproj/project.pbxproj | 4 +-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/PiBar for macOS/Views/Base.lproj/Main.storyboard b/PiBar for macOS/Views/Base.lproj/Main.storyboard index ca5e99c..15b638f 100644 --- a/PiBar for macOS/Views/Base.lproj/Main.storyboard +++ b/PiBar for macOS/Views/Base.lproj/Main.storyboard @@ -9,7 +9,7 @@ - + @@ -30,7 +30,7 @@ - + @@ -51,7 +51,7 @@ - + @@ -75,7 +75,7 @@ - + PiBar © 2020 Brad Root Pi-hole® is a registered trademark of Pi-hole LLC. @@ -98,7 +98,7 @@ of Pi-hole LLC. - + @@ -143,13 +143,13 @@ of Pi-hole LLC. - + - + @@ -157,19 +157,19 @@ of Pi-hole LLC. - + - + - + - + - + @@ -557,7 +557,7 @@ of Pi-hole LLC. - + diff --git a/PiBar.xcodeproj/project.pbxproj b/PiBar.xcodeproj/project.pbxproj index aaefd91..b11ae88 100644 --- a/PiBar.xcodeproj/project.pbxproj +++ b/PiBar.xcodeproj/project.pbxproj @@ -597,7 +597,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 2Y9M69QJKZ; INFOPLIST_FILE = "PiBar for iOS/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 13.5; + IPHONEOS_DEPLOYMENT_TARGET = 11.4; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -617,7 +617,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 2Y9M69QJKZ; INFOPLIST_FILE = "PiBar for iOS/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 13.5; + IPHONEOS_DEPLOYMENT_TARGET = 11.4; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", From 03719d64a790e1469c0e2ae284f0e336f45d3f2d Mon Sep 17 00:00:00 2001 From: Brad Root Date: Sat, 30 May 2020 11:23:23 -0700 Subject: [PATCH 05/58] fix issues with scenedelegate stuff for iOS version <13 --- PiBar for iOS/AppDelegate.swift | 5 +++-- PiBar for iOS/SceneDelegate.swift | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/PiBar for iOS/AppDelegate.swift b/PiBar for iOS/AppDelegate.swift index d150830..5b58799 100644 --- a/PiBar for iOS/AppDelegate.swift +++ b/PiBar for iOS/AppDelegate.swift @@ -11,7 +11,7 @@ import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { - + var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. @@ -19,13 +19,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate { } // MARK: UISceneSession Lifecycle - + @available(iOS 13.0, *) func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { // Called when a new scene session is being created. // Use this method to select a configuration to create the new scene with. return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } + @available(iOS 13.0, *) func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { // Called when the user discards a scene session. // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. diff --git a/PiBar for iOS/SceneDelegate.swift b/PiBar for iOS/SceneDelegate.swift index cdf1a40..562c3a0 100644 --- a/PiBar for iOS/SceneDelegate.swift +++ b/PiBar for iOS/SceneDelegate.swift @@ -8,6 +8,7 @@ import UIKit +@available(iOS 13.0, *) class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? From 119788a6f9d9ea6ee55605290ce72ca402d7ba30 Mon Sep 17 00:00:00 2001 From: Brad Root Date: Sat, 30 May 2020 12:49:55 -0700 Subject: [PATCH 06/58] get rid of tab bar controller (don't think I'll need it) --- .../first.imageset/Contents.json | 10 +- .../Assets.xcassets/first.imageset/first.pdf | Bin 2465 -> 0 bytes .../first.imageset/pibar_menuIcon_22px.pdf | Bin 0 -> 47678 bytes PiBar for iOS/Base.lproj/Main.storyboard | 105 +++++------------- PiBar for iOS/FirstViewController.swift | 20 ---- PiBar for iOS/SecondViewController.swift | 20 ---- PiBar.xcodeproj/project.pbxproj | 8 -- 7 files changed, 32 insertions(+), 131 deletions(-) delete mode 100644 PiBar for iOS/Assets.xcassets/first.imageset/first.pdf create mode 100644 PiBar for iOS/Assets.xcassets/first.imageset/pibar_menuIcon_22px.pdf delete mode 100644 PiBar for iOS/FirstViewController.swift delete mode 100644 PiBar for iOS/SecondViewController.swift diff --git a/PiBar for iOS/Assets.xcassets/first.imageset/Contents.json b/PiBar for iOS/Assets.xcassets/first.imageset/Contents.json index 33a7451..dc3718f 100644 --- a/PiBar for iOS/Assets.xcassets/first.imageset/Contents.json +++ b/PiBar for iOS/Assets.xcassets/first.imageset/Contents.json @@ -1,12 +1,12 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "first.pdf" + "filename" : "pibar_menuIcon_22px.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/PiBar for iOS/Assets.xcassets/first.imageset/first.pdf b/PiBar for iOS/Assets.xcassets/first.imageset/first.pdf deleted file mode 100644 index 47d911dea647d55983671ead4d08b6f6b3600715..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2465 zcmai03se(l7FLvisY+L#f-EBsK`11Xkc1=%MIujmB|xQ!>5vQ%APFP`Mlf5nSPOKE z2-^C>7DZkM!J;Da5{kfrC?Kvp3J41-3shFXvhuJqKo*oer*r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q@&04fsADHfBccq^gpm8Q_u-~Uj|Z$YwSR(^_mzUb!}Xb2Cj`uqphg}v_Y%?Fs=;= zWq3s{hy)Tu!ji@RJsd$C+G{F6V2j1*Xk+7xo|LO7M2yb)(wc=%x-AclP9pLsbTF7m tf?*P!2EjJu5MD57P32Q4pdJ3tO_shCDT2=K;$ebx8ymcd$v!V9{2$sQiO>K5 diff --git a/PiBar for iOS/Assets.xcassets/first.imageset/pibar_menuIcon_22px.pdf b/PiBar for iOS/Assets.xcassets/first.imageset/pibar_menuIcon_22px.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0d079ba3347b79cfbb6095bb806ef1cd8d542f59 GIT binary patch literal 47678 zcmeIb2e=be`ah1Yf}p7DT2>b|q9_lNnfdHQxH9+ zGa4|X)&T2JM1$!_h=O4735KUfwZ^_Flm^o4b)ZNCYfue@kQlgts0jmv5U3VI`i@k& z1*Re)tU&>&C6N|H89Qj~gb4q$aGG_83BdCmdT4X3D&LtR?ML{4cJHw{L zv;rqoK82d->nn)@Ll?%5Nxv1FK7AEEefq!eAF+)tv%~c#{Ppz6--*4>d$=~|vJ=Vk zPc+?p0=evovo7B6oON66JOMgt`ZiBOYUtDHr>}}ibI!XQd`SmNJB%yw- zb}%BHpha2%6bXpRO{bWW0+zq~>pY{Ad|J=j{q2e zAJWH>DqWso64G@D6iNROr2pecm7Zfoh80T+Ni<%SUf}pm)HDfPnO8{a0qWW5lIY+P znPi4ZOr&}d2!S9BAz%VSA$1R=IS7Idnxt|ti4467c5Ye#?e-7Q%apjX5NAq2gY;aU z6MQ@!XQUrKNCA{o;qB{F8ET@*Cjz)Yxe1iRU@-CpH|R7Yh#8sOp$Au*Vsq$W1>BUT zLysunrVcvvYTymzQ8@IHtv9)V2E3faT>+{5LZ+~ZZp%@j%`job=N(|WIr64 z-cEhqnafh4*M^bIlQJ*GB8>e!OKI_xYE_U*Z@47X9hY z;|_~{JZsq=KmYQ*_|J)NpYzF^KLuIW+z(v!#SeV5`#hEF(eK7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5Xi~ElCrsSLYhjO==%C}^Ria!e zeZ-`8?fx~+#O4}jlFGp)Hs4BXY1QA%MoX(nDt|`IGZXntj24atuN*I1;v9Q4g7CFT zeey7+LDd8%Id%-BK*2}*Pl02Y8dFFYMx)iET4Uc7N(1TjI#8s6HQ+7d n2#J9U;6cd-2q91{hV&f?x)0t)E{JmHVHh7fVS>SB9Q*$PE64i{ literal 0 HcmV?d00001 diff --git a/PiBar for iOS/Base.lproj/Main.storyboard b/PiBar for iOS/Base.lproj/Main.storyboard index 45d7dc5..9c96903 100644 --- a/PiBar for iOS/Base.lproj/Main.storyboard +++ b/PiBar for iOS/Base.lproj/Main.storyboard @@ -1,5 +1,5 @@ - + @@ -7,97 +7,46 @@ - - + + - - + + - - - - - - - - - - - + - + + + + - + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - + - - + + - + - - + + diff --git a/PiBar for iOS/FirstViewController.swift b/PiBar for iOS/FirstViewController.swift deleted file mode 100644 index fb57cf6..0000000 --- a/PiBar for iOS/FirstViewController.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// FirstViewController.swift -// PiBar for iOS -// -// Created by Brad Root on 5/30/20. -// Copyright © 2020 Brad Root. All rights reserved. -// - -import UIKit - -class FirstViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view. - } - - -} - diff --git a/PiBar for iOS/SecondViewController.swift b/PiBar for iOS/SecondViewController.swift deleted file mode 100644 index 3a1ec6b..0000000 --- a/PiBar for iOS/SecondViewController.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// SecondViewController.swift -// PiBar for iOS -// -// Created by Brad Root on 5/30/20. -// Copyright © 2020 Brad Root. All rights reserved. -// - -import UIKit - -class SecondViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view. - } - - -} - diff --git a/PiBar.xcodeproj/project.pbxproj b/PiBar.xcodeproj/project.pbxproj index b11ae88..9e6d3fe 100644 --- a/PiBar.xcodeproj/project.pbxproj +++ b/PiBar.xcodeproj/project.pbxproj @@ -9,8 +9,6 @@ /* Begin PBXBuildFile section */ 440DE4642482D37D00C55354 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 440DE4632482D37D00C55354 /* AppDelegate.swift */; }; 440DE4662482D37D00C55354 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 440DE4652482D37D00C55354 /* SceneDelegate.swift */; }; - 440DE4682482D37D00C55354 /* FirstViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 440DE4672482D37D00C55354 /* FirstViewController.swift */; }; - 440DE46A2482D37D00C55354 /* SecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 440DE4692482D37D00C55354 /* SecondViewController.swift */; }; 440DE46D2482D37D00C55354 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 440DE46B2482D37D00C55354 /* Main.storyboard */; }; 440DE46F2482D37D00C55354 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 440DE46E2482D37D00C55354 /* Assets.xcassets */; }; 440DE4722482D37D00C55354 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 440DE4702482D37D00C55354 /* LaunchScreen.storyboard */; }; @@ -67,8 +65,6 @@ 440DE4612482D37C00C55354 /* PiBar for iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "PiBar for iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 440DE4632482D37D00C55354 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 440DE4652482D37D00C55354 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; - 440DE4672482D37D00C55354 /* FirstViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstViewController.swift; sourceTree = ""; }; - 440DE4692482D37D00C55354 /* SecondViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecondViewController.swift; sourceTree = ""; }; 440DE46C2482D37D00C55354 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 440DE46E2482D37D00C55354 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 440DE4712482D37D00C55354 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; @@ -139,8 +135,6 @@ children = ( 440DE4632482D37D00C55354 /* AppDelegate.swift */, 440DE4652482D37D00C55354 /* SceneDelegate.swift */, - 440DE4672482D37D00C55354 /* FirstViewController.swift */, - 440DE4692482D37D00C55354 /* SecondViewController.swift */, 440DE46B2482D37D00C55354 /* Main.storyboard */, 440DE46E2482D37D00C55354 /* Assets.xcassets */, 440DE4702482D37D00C55354 /* LaunchScreen.storyboard */, @@ -524,9 +518,7 @@ 440DE4782482D58B00C55354 /* Extensions.swift in Sources */, 440DE47E2482D59C00C55354 /* AsyncOperation.swift in Sources */, 440DE4792482D58D00C55354 /* Logging.swift in Sources */, - 440DE46A2482D37D00C55354 /* SecondViewController.swift in Sources */, 440DE47A2482D59000C55354 /* Structs.swift in Sources */, - 440DE4682482D37D00C55354 /* FirstViewController.swift in Sources */, 440DE47B2482D59300C55354 /* PiholeAPI.swift in Sources */, 440DE47F2482D59F00C55354 /* UpdatePiholeOperation.swift in Sources */, 440DE47D2482D59900C55354 /* PiBarManager.swift in Sources */, From f915e107be60d410d2c318efeb1caa1752041bd7 Mon Sep 17 00:00:00 2001 From: Brad Root Date: Tue, 2 Jun 2020 22:33:38 -0700 Subject: [PATCH 07/58] rudimentary network overview view is in place --- PiBar Shared/Manager/PiBarManager.swift | 2 +- .../first.imageset/Contents.json | 12 - .../first.imageset/pibar_menuIcon_22px.pdf | Bin 47678 -> 0 bytes .../second.imageset/Contents.json | 12 - .../second.imageset/second.pdf | Bin 2423 -> 0 bytes PiBar for iOS/Base.lproj/Main.storyboard | 314 ++++++++++++++++-- PiBar for iOS/Info.plist | 5 + PiBar for iOS/MainViewController.swift | 85 +++++ PiBar for iOS/NetworkOverviewView.swift | 54 +++ PiBar.xcodeproj/project.pbxproj | 10 +- 10 files changed, 444 insertions(+), 50 deletions(-) delete mode 100644 PiBar for iOS/Assets.xcassets/first.imageset/Contents.json delete mode 100644 PiBar for iOS/Assets.xcassets/first.imageset/pibar_menuIcon_22px.pdf delete mode 100644 PiBar for iOS/Assets.xcassets/second.imageset/Contents.json delete mode 100644 PiBar for iOS/Assets.xcassets/second.imageset/second.pdf create mode 100644 PiBar for iOS/MainViewController.swift create mode 100644 PiBar for iOS/NetworkOverviewView.swift diff --git a/PiBar Shared/Manager/PiBarManager.swift b/PiBar Shared/Manager/PiBarManager.swift index 1972d91..b55d3a3 100644 --- a/PiBar Shared/Manager/PiBarManager.swift +++ b/PiBar Shared/Manager/PiBarManager.swift @@ -29,7 +29,7 @@ class PiBarManager: NSObject { private let operationQueue: OperationQueue = OperationQueue() override init() { - Log.logLevel = .off + Log.logLevel = .debug Log.useEmoji = true operationQueue.maxConcurrentOperationCount = 1 diff --git a/PiBar for iOS/Assets.xcassets/first.imageset/Contents.json b/PiBar for iOS/Assets.xcassets/first.imageset/Contents.json deleted file mode 100644 index dc3718f..0000000 --- a/PiBar for iOS/Assets.xcassets/first.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "filename" : "pibar_menuIcon_22px.pdf", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/PiBar for iOS/Assets.xcassets/first.imageset/pibar_menuIcon_22px.pdf b/PiBar for iOS/Assets.xcassets/first.imageset/pibar_menuIcon_22px.pdf deleted file mode 100644 index 0d079ba3347b79cfbb6095bb806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rsZZkLl5oVxlYRC11Db+dT^_kU2l3Im1Y==On7(+VFPmMI@<&9 zSO*zl(zd*v+SvWrwPWR-Se|xR+w!(lx(zu(GCMhl*^cpbJ#a+Jxp#t_rZsPMk&b+3TPj_LoSexgC(yPtw7cKv+Kb^%jIQ+> zI`H%c>7M>g-i$aGwPCJ}D8nxV5Re4L6N+C=EV9YJV$!+V!}#d)f(ZZK95FYg2U_Zp};(=~Ie2wT>XV z9=d_9c7ojiRY%|rkaZn;;AVR%>Lj0#wT~dWAH8;0J3_Bb)fswivaUl9lTXON=azN8 zIlL3HHdSZnwaK~;Jx%j;TFzY6wD#-WZ+n{IoVCDhs?N}BlXV+<2)HXs%IJ|!r@?3c zj<);JYX@*U@|ds`^tl@c$sX2qVpWU@1<8Z!z%>(CcALKd`o?oE?GJ7E8Bb z2OhF0?U}cu9Gscl~~Ac-Vnq_B+~+z=PWd)!l|3Oh~bg{@pU%nnk)EJ$P7or63V=IOq-BZu6(m z`+u=wABv|uMCm}v~&%^{;sLO9J0vqr3Y7L|T zNYu67{uhJwzwoFJfhR+gn=~6;>nCmYlw!b3o-@4s@<8cAv(!r&`^JE7_kzTj0wdC! z&4FsCOZ?d{17rHLoHj%MzeYAAoQ*I2Ph1iECq-Y^LOY;@XUG zHoo*facwM<&6I3TTw|sjR^!3T_!vNFn_{ zWr|8(kAN33Qs8xi6RBS5EwT`X5HNwEkQ%)E_aF#5Xi~ElCrsSLYhjO==%C}^Ria!e zeZ-`8?fx~+#O4}jlFGp)Hs4BXY1QA%MoX(nDt|`IGZXntj24atuN*I1;v9Q4g7CFT zeey7+LDd8%Id%-BK*2}*Pl02Y8dFFYMx)iET4Uc7N(1TjI#8s6HQ+7d n2#J9U;6cd-2q91{hV&f?x)0t)E{JmHVHh7fVS>SB9Q*$PE64i{ diff --git a/PiBar for iOS/Assets.xcassets/second.imageset/Contents.json b/PiBar for iOS/Assets.xcassets/second.imageset/Contents.json deleted file mode 100644 index 03bd9c9..0000000 --- a/PiBar for iOS/Assets.xcassets/second.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "second.pdf" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/PiBar for iOS/Assets.xcassets/second.imageset/second.pdf b/PiBar for iOS/Assets.xcassets/second.imageset/second.pdf deleted file mode 100644 index 401614e288b4b160471c2776bed6f09762af3e1c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2423 zcmai02~-nz8dqq7rWU#)x2z)&iMWtV?gK$2a)?|BP!TbkV}J-Gl1wmy+3G9S0=uOY zwCjai6uBOPMMdNiN`VDYKwLQr2#W^`R93*Ua=0^)EGYY4=grIf|KIohziYnv{elnR zdN_hk6db<(+3RPcxs!iut8c(j0TLh=9mY931H^rhEE0|aXo!dh5Iv+ZFr+}9F+v#P zLSnfD0$f~hN>~92V{z)WJA&2)5rW!|I?;o?oI*%zejJiuY>hFLQwKlAa9O+PnPh#% zJp~JAfs-De6u@;{cREMs}D-sGib_4>50m8_|Uj-zC0m@Qx zJV+^5Da4Qxpf3sBtKZs<_aI$Cb1T+h<->yL^rfiGNelYkqgC3#SqVP_iy*_RPcbjH)xYf zvYdC-)D_t8c{=5%;$VJQxs_#61J*kuXMC?|&PbPo-7uSxoNr~&J94|gKk+03JGXXM zx4w~=^VUzWqQveu_ilRgPdgNNdnLZCH`=;w91}cP5ihdm*B_jI+rk=Pz2Lk!)XUu| zkls3P5&YHJ!t0kF+MUVBHOAx)a zy|JxHNd37z*~b5#%*0w_F|#4?erNP;pG`Fevoq2%?9Y>%Cmzv1(ks;aPIGaiy1mhU zr{7lB^Mem&`QK{b{uiDC zLD8muY(FNk{YdV|zO#o_VB%);8|~Bh(Z4p?GM}g-HN2;q7~YNl-lD~HZ$taYw$Fzbn6c?c5eo=@`i>()el#qwB)hI-gp0 ztsw@dh-I5NJkk)RCoBC`L8ffKfY)=oG=#4LA9TO6eA}9~@a6dupB+=S{%s&NY}^0GY`hAqod)uxXHitrN%bWOJohV>t?!&Z#d4y^7J@=Oh`HV zee**4j>xRUd)|D0^I-B#<`m1-5PO{)!v(q?ecFYqr_8Q{+z7#n0uFbq%_?hZ-Ck(6NRn=vDS7Nb1Xxx_)9`!i- zGR>av*PJ+P_AGO*a_$FbtCCISg5PK44p&W#t$)+HVcxpR9LAL%_Pv$p`0tO*sYZD0 zCG3-ipr4WoVbjpw%Nf^r^rnWcDcjumgBPEjO;NM6QtZ8wU#0rjHx5zs%CahF4$W*U zxu!q8kYP+>v!BNPVIRJUGIWU@7qVvx2VZDw4gV8%z%bjpF#aF(W|PmliwlakuRq>= zhaCRc^R!7T)#Twb0{!Tns=CxGcGX|leErg`f3|v0eBXxHU&6Sj-_>zOL!!d+j5Xt* zPS;rWd^zEF{5d5%)nNK=)zFJ8Uc=aQKD%UK)_TNes1Gh{SD*Mb_@O` z7*zs9Uq~Vq?v|^8FcM-yLGMKzR3YFB0z@CFM2X-dio%Gu6&MJj=I?uS7sA3AdE^p8 zE49$PjJzPIJwfn;jso7X2#jynr3dO@p5QAK1O9wqKLC=PkQjj~p#n|-5O`ihbTzzu zL{}2QEe28pJYfVZRW56FL`LvO&|C^1Th{0}hQMW$Ng$QPpnzlwnMnf=kVy8(y==L% zLMa>r0gELdT - - + + + - - + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - - + + - + - + - + - - - - diff --git a/PiBar for iOS/Info.plist b/PiBar for iOS/Info.plist index e7f6f58..cc83265 100644 --- a/PiBar for iOS/Info.plist +++ b/PiBar for iOS/Info.plist @@ -2,6 +2,11 @@ + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleExecutable diff --git a/PiBar for iOS/MainViewController.swift b/PiBar for iOS/MainViewController.swift new file mode 100644 index 0000000..c5c7287 --- /dev/null +++ b/PiBar for iOS/MainViewController.swift @@ -0,0 +1,85 @@ +// +// MainViewController.swift +// PiBar for iOS +// +// Created by Brad Root on 6/2/20. +// Copyright © 2020 Brad Root. All rights reserved. +// + +import UIKit + +class MainViewController: UIViewController { + + private let manager: PiBarManager = PiBarManager() + + @IBOutlet weak var networkOverviewView: NetworkOverviewView! + @IBOutlet weak var tableView: UITableView! + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + networkOverviewView.layer.cornerRadius = 50 + networkOverviewView.layer.maskedCorners = [.layerMaxXMinYCorner, .layerMinXMinYCorner] + networkOverviewView.clipsToBounds = true + + networkOverviewView.manager = manager + + Preferences.standard.set(piholes: [PiholeConnectionV2( + hostname: "pi-hole.local", + port: 80, + useSSL: false, + token: "", + passwordProtected: false, + adminPanelURL: "http://pi-hole.local/admin" + )]) + + manager.delegate = self + + manager.loadConnections() + + } + + override func viewDidLayoutSubviews() { + super.viewDidLayoutSubviews() + + tableView.contentInset.bottom = networkOverviewView.frame.height - 25 + tableView.scrollIndicatorInsets.bottom = networkOverviewView.frame.height - 60 + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destination. + // Pass the selected object to the new view controller. + } + */ + +} + +extension MainViewController: PiBarManagerDelegate { + func updateNetwork(_ network: PiholeNetworkOverview) { + networkOverviewView.networkOverview = network + } +} + +extension MainViewController: UITableViewDelegate { + +} + +extension MainViewController: UITableViewDataSource { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return 20 + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "piholeCell", for: indexPath) + + return cell + } + + +} diff --git a/PiBar for iOS/NetworkOverviewView.swift b/PiBar for iOS/NetworkOverviewView.swift new file mode 100644 index 0000000..52e6035 --- /dev/null +++ b/PiBar for iOS/NetworkOverviewView.swift @@ -0,0 +1,54 @@ +// +// NetworkOverviewView.swift +// PiBar for iOS +// +// Created by Brad Root on 6/2/20. +// Copyright © 2020 Brad Root. All rights reserved. +// + +import UIKit + +class NetworkOverviewView: UIView { + + weak var manager: PiBarManager? + + @IBOutlet var totalQueriesLabel: UILabel! + @IBOutlet var blockedQueriesLabel: UILabel! + @IBOutlet var networkStatusLabel: UILabel! + @IBOutlet var avgBlocklistLabel: UILabel! + + @IBOutlet var disableButton: UIButton! + + @IBAction func disableButtonAction(_ sender: UIButton) { + let seconds = sender.tag > 0 ? sender.tag : nil + Log.info("Disabling via Menu for \(String(describing: seconds)) seconds") + manager?.disableNetwork(seconds: seconds) + } + + var networkOverview: PiholeNetworkOverview? { + didSet { + DispatchQueue.main.async { + guard let networkOverview = self.networkOverview else { return } + self.totalQueriesLabel.text = networkOverview.totalQueriesToday.string + self.blockedQueriesLabel.text = "\(networkOverview.adsBlockedToday.string) (\(networkOverview.adsPercentageToday.string))" + self.networkStatusLabel.text = networkOverview.networkStatus.rawValue + self.avgBlocklistLabel.text = networkOverview.averageBlocklist.string + } + } + } + + override func layoutSubviews() { + super.layoutSubviews() + + disableButton.layer.cornerRadius = disableButton.frame.height / 2 + } + + /* + // Only override draw() if you perform custom drawing. + // An empty implementation adversely affects performance during animation. + override func draw(_ rect: CGRect) { + // Drawing code + } + */ + +} diff --git a/PiBar.xcodeproj/project.pbxproj b/PiBar.xcodeproj/project.pbxproj index 9e6d3fe..7440fc2 100644 --- a/PiBar.xcodeproj/project.pbxproj +++ b/PiBar.xcodeproj/project.pbxproj @@ -34,6 +34,8 @@ 442F6F8B24721523008F1101 /* PreferencesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 442F6F8A24721523008F1101 /* PreferencesViewController.swift */; }; 4438184E247DE31A009D9B3F /* AboutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4438184D247DE31A009D9B3F /* AboutViewController.swift */; }; 44381850247DE41B009D9B3F /* AboutWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4438184F247DE41B009D9B3F /* AboutWindowController.swift */; }; + 448C6F1C248746A2004C30BE /* NetworkOverviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 448C6F1B248746A2004C30BE /* NetworkOverviewView.swift */; }; + 448C6F1E24874AF5004C30BE /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 448C6F1D24874AF5004C30BE /* MainViewController.swift */; }; 449395D62471ABD600FA0C34 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 449395D52471ABD600FA0C34 /* AppDelegate.swift */; }; 449395DA2471ABD700FA0C34 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 449395D92471ABD700FA0C34 /* Assets.xcassets */; }; 449395DD2471ABD700FA0C34 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 449395DB2471ABD700FA0C34 /* Main.storyboard */; }; @@ -81,6 +83,8 @@ 442F6F8A24721523008F1101 /* PreferencesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreferencesViewController.swift; sourceTree = ""; }; 4438184D247DE31A009D9B3F /* AboutViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutViewController.swift; sourceTree = ""; }; 4438184F247DE41B009D9B3F /* AboutWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutWindowController.swift; sourceTree = ""; }; + 448C6F1B248746A2004C30BE /* NetworkOverviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkOverviewView.swift; sourceTree = ""; }; + 448C6F1D24874AF5004C30BE /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = ""; }; 449395D22471ABD600FA0C34 /* PiBar for macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "PiBar for macOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 449395D52471ABD600FA0C34 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 449395D92471ABD700FA0C34 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -139,6 +143,8 @@ 440DE46E2482D37D00C55354 /* Assets.xcassets */, 440DE4702482D37D00C55354 /* LaunchScreen.storyboard */, 440DE4732482D37D00C55354 /* Info.plist */, + 448C6F1B248746A2004C30BE /* NetworkOverviewView.swift */, + 448C6F1D24874AF5004C30BE /* MainViewController.swift */, ); path = "PiBar for iOS"; sourceTree = ""; @@ -219,8 +225,8 @@ 440DE4772482D54E00C55354 /* PiBar Shared */, 449395D42471ABD600FA0C34 /* PiBar for macOS */, 440DE4622482D37D00C55354 /* PiBar for iOS */, - 449395D32471ABD600FA0C34 /* Products */, 214831E348424C32082556DF /* Pods */, + 449395D32471ABD600FA0C34 /* Products */, 913B94517DDE1EF8E0C98FB2 /* Frameworks */, ); sourceTree = ""; @@ -515,6 +521,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 448C6F1C248746A2004C30BE /* NetworkOverviewView.swift in Sources */, + 448C6F1E24874AF5004C30BE /* MainViewController.swift in Sources */, 440DE4782482D58B00C55354 /* Extensions.swift in Sources */, 440DE47E2482D59C00C55354 /* AsyncOperation.swift in Sources */, 440DE4792482D58D00C55354 /* Logging.swift in Sources */, From 1c7b670e47e396b21dc9c0253057361fe534265f Mon Sep 17 00:00:00 2001 From: Brad Root Date: Tue, 2 Jun 2020 22:52:27 -0700 Subject: [PATCH 08/58] disable landscape on iphone --- PiBar for iOS/Info.plist | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/PiBar for iOS/Info.plist b/PiBar for iOS/Info.plist index cc83265..1c71ced 100644 --- a/PiBar for iOS/Info.plist +++ b/PiBar for iOS/Info.plist @@ -2,11 +2,6 @@ - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleExecutable @@ -65,9 +60,12 @@ UISupportedInterfaceOrientations UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait From 53d7a59b0534533f0a65c6bd94722741e728b4ea Mon Sep 17 00:00:00 2001 From: Brad Root Date: Tue, 2 Jun 2020 23:07:32 -0700 Subject: [PATCH 09/58] add settings icon --- .../settings.imageset/Contents.json | 16 +++++++++++ .../settings.imageset/Settings Icon.pdf | Bin 0 -> 6507 bytes PiBar for iOS/Base.lproj/Main.storyboard | 5 +++- PiBar for iOS/MainViewController.swift | 26 ++++++++++++++++-- 4 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 PiBar for iOS/Assets.xcassets/settings.imageset/Contents.json create mode 100644 PiBar for iOS/Assets.xcassets/settings.imageset/Settings Icon.pdf diff --git a/PiBar for iOS/Assets.xcassets/settings.imageset/Contents.json b/PiBar for iOS/Assets.xcassets/settings.imageset/Contents.json new file mode 100644 index 0000000..9fd77f5 --- /dev/null +++ b/PiBar for iOS/Assets.xcassets/settings.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "filename" : "Settings Icon.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true, + "template-rendering-intent" : "template" + } +} diff --git a/PiBar for iOS/Assets.xcassets/settings.imageset/Settings Icon.pdf b/PiBar for iOS/Assets.xcassets/settings.imageset/Settings Icon.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1010dd8e4f95c8b93369f4d1034029e52bc8320f GIT binary patch literal 6507 zcma)BU616p5q#IL(8~e#gSq;mC;^6n_%05DB**u4*=m z+?xZEdD51sX0yAxx}|;d{@r(9jUjd2*bn{X@Birf{_C&%Z@%e{=MVg|n_B$tkH_=J zm!J9>;5}DeU!IQ-Pu<#%J*S8i*ZXIR=pnkJa) z#~8+aqs>DHG;VpP7~(t)!^o9uTzDTVw{0Fr!}eh}J8Kwc+wag#V_5dp_DQgA`@kc_ zeIBN1?#C4Nh@G|`*v2c^+`_cN()=2WyPeEz)|LBIRu+qUnC3mk$fwKRdsq?-&iOok zUGJZG%3)v_`P9D7F(L{ZqA+cn`L;9Kk^cHA>eGmkpV(rED5SLau<5Zu+!?QEQDO{n zVevv-!Hy={SZ5j7=%?oeF=}%~9}%O^<+Ntso-QlJ6nG@AOmo0-Qreh*5Qa>emO|1I zce9rjgH5oDsT`V>rw-0-iQ%eC_rO>)f7+!&a_4|Y%R2Fv_A2PK-N7fY4H;1+wy+H& zw`fDQg$4d0UjXBV9L63g95eltf&{*gDS>Bu@LV0bHB89}UDJB%kiQ`@SH=m;{}Oic z&8X=#SwdvdASdD*I2z(m%EIXe+LPB7b8wWYMc!JW!xV%;;Xtjjm>*1-ot~UJ(D}GRM#P#m4CD$5 zwU8lFMvZzE0k2pBwB^)_VMxBp`M02X43snNClb^5!so&!(gn0{ncj($W)IU7Cn2doZOGzV?Z<);74<)X zhzgRQyRpEwo8B~7rzYYJgGizM`qH%ribh3281L`erOI!0r(%chCwjywg>wp}6|vhn zU$!U-L`9g;eegqn83LlofHqcz!BbfB=~SqtA?>-z2t^*yPAGNI@B#V>H_#t*$H%=a zgUG`c)(KUyQ$lk829y#;%c(~Tv>}G3g zTcObyK4w%;V$_&bfK#-RiU@TcCEzK?YF5vjN*}fPcx6Fpj0X+&k;;v^(x?0xp|Tu8 zKn5rTQYc7r1Xlz~xZp|yqLnNQRAojsEdPite|WionLJ1eg1yWr#tAn9nPwX%sSd2UiX70^ zhWz@YRVl<|gEg#kJ{t@Fm;>aLCJz`gjeeUY-^Y7w z&L6vpp@*C%^V|fT0HrHJ@`72-bL)Z}lF&}O>@@gATgEza&1#D^PtsWhumJ5sp|s%A zW!f^zrBcr9PK9yGlQRya5ro{9G*=K@$#g*9(aM%IpW%@!7$?S0n8~tgL1%E?qTzWN zUIjHnW32~HOXYA{sR%%3y$%&9Kwht8gU6GNoOL~sV_xc3{mi{`Q&fTpQxYLDrYB>Y z{h~W~O)2TG>eN2!Dn?hFU{&vo0WN}{N+ndkft=IzQO<%UzQ`~2*aq1XKxmdJ4|N+G zCX;fc5HAx{cY8@uodQA^KzZW4D(BiQDj$H|bQL(`{ioH8+N(^2TuDk-!?+`1de!~P zn=nFWKR9G!mj`X3CX~*p=6Ug=*{8+)+m6|!Dzfn9z1eiMIj4x##6!%=fn({yCaFcA za)hmE<<4S~Z4K1kw$*}Q(K{%fc6Q+v7pTw{izsl+RWqd~Man3=n^SeU3fWRQU$n za4L6I#OQ?i?Z@ui{pJ7t0Lj+HA4<~oV48E9YQ zivd}>T`t5v+I(VE8_R%@Wk9z&Ir@R?JXH-S`psj^M@BL zPeoL;TnKg9mkZOy?JXIg{<>0W8!eZ^S}ugA&Sc_uasTLDzL4`{c>Z$EFSq(|z6iz# z^}FAk&zF~L|HI$#fgQiQzy9Z+$Nuj9!^fioe>#46eE9bAOaDWCe^!?3i%h*LmhO+& z%g@h;2m#9G2)By9DBh2!<=SU z{aFx(ve!`D@jme>gm;bC&^kuMhCkVY$kYd4o*y1h$LEgO`~5qFG);;#p8!B pb5QQ?FPE2|2ets;egF91BfPhNi#$BP*m2fri`| - + @@ -315,4 +315,7 @@ + + + diff --git a/PiBar for iOS/MainViewController.swift b/PiBar for iOS/MainViewController.swift index c5c7287..eaa4217 100644 --- a/PiBar for iOS/MainViewController.swift +++ b/PiBar for iOS/MainViewController.swift @@ -11,6 +11,13 @@ import UIKit class MainViewController: UIViewController { private let manager: PiBarManager = PiBarManager() + private var networkOverview: PiholeNetworkOverview? { + didSet { + DispatchQueue.main.async { + self.tableView.reloadData() + } + } + } @IBOutlet weak var networkOverviewView: NetworkOverviewView! @IBOutlet weak var tableView: UITableView! @@ -25,14 +32,24 @@ class MainViewController: UIViewController { networkOverviewView.manager = manager - Preferences.standard.set(piholes: [PiholeConnectionV2( + Preferences.standard.set(piholes: [ + PiholeConnectionV2( hostname: "pi-hole.local", port: 80, useSSL: false, token: "", passwordProtected: false, adminPanelURL: "http://pi-hole.local/admin" - )]) + ), + PiholeConnectionV2( + hostname: "rickenbacker.local", + port: 80, + useSSL: false, + token: "b17660b345e1871a06177e27b06404cd10088d3e19f5d4248b8b349e14f127b8", + passwordProtected: true, + adminPanelURL: "http://rickenbacker.local/admin" + ), + ]) manager.delegate = self @@ -63,6 +80,7 @@ class MainViewController: UIViewController { extension MainViewController: PiBarManagerDelegate { func updateNetwork(_ network: PiholeNetworkOverview) { networkOverviewView.networkOverview = network + networkOverview = network } } @@ -72,7 +90,9 @@ extension MainViewController: UITableViewDelegate { extension MainViewController: UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return 20 + guard let networkOverview = self.networkOverview else { return 0 } + + return networkOverview.piholes.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { From 96289ce8962959a00757df0178698f912be29454 Mon Sep 17 00:00:00 2001 From: Brad Root Date: Tue, 2 Jun 2020 23:17:41 -0700 Subject: [PATCH 10/58] better corner rounding --- PiBar for iOS/MainViewController.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PiBar for iOS/MainViewController.swift b/PiBar for iOS/MainViewController.swift index eaa4217..a73f5f7 100644 --- a/PiBar for iOS/MainViewController.swift +++ b/PiBar for iOS/MainViewController.swift @@ -25,11 +25,11 @@ class MainViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - // Do any additional setup after loading the view. - networkOverviewView.layer.cornerRadius = 50 - networkOverviewView.layer.maskedCorners = [.layerMaxXMinYCorner, .layerMinXMinYCorner] + let maskLayer = CAShapeLayer() + maskLayer.path = UIBezierPath(roundedRect: view.bounds, byRoundingCorners: [.topLeft, .topRight], cornerRadii: CGSize(width: 38.5, height: 38.5)).cgPath + networkOverviewView.layer.mask = maskLayer networkOverviewView.clipsToBounds = true - + networkOverviewView.manager = manager Preferences.standard.set(piholes: [ From 62ca025c6899b69ef495c2d910c844b1c1115690 Mon Sep 17 00:00:00 2001 From: Brad Root Date: Wed, 3 Jun 2020 16:35:34 -0700 Subject: [PATCH 11/58] stack views make life better --- .../Contents.json | 36 ++ PiBar for iOS/Base.lproj/Main.storyboard | 308 ++++++++++++------ PiBar for iOS/MainViewController.swift | 18 +- PiBar for iOS/NetworkOverviewView.swift | 4 +- PiBar for iOS/PiholeTableViewCell.swift | 56 ++++ PiBar.xcodeproj/project.pbxproj | 4 + 6 files changed, 324 insertions(+), 102 deletions(-) create mode 100644 PiBar for iOS/Assets.xcassets/containerBackground.colorset/Contents.json create mode 100644 PiBar for iOS/PiholeTableViewCell.swift diff --git a/PiBar for iOS/Assets.xcassets/containerBackground.colorset/Contents.json b/PiBar for iOS/Assets.xcassets/containerBackground.colorset/Contents.json new file mode 100644 index 0000000..2101b4b --- /dev/null +++ b/PiBar for iOS/Assets.xcassets/containerBackground.colorset/Contents.json @@ -0,0 +1,36 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "1.000", + "green" : "1.000", + "red" : "1.000" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "extended-gray", + "components" : { + "alpha" : "1.000", + "white" : "0.223" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/PiBar for iOS/Base.lproj/Main.storyboard b/PiBar for iOS/Base.lproj/Main.storyboard index 47806dd..1a7fc70 100644 --- a/PiBar for iOS/Base.lproj/Main.storyboard +++ b/PiBar for iOS/Base.lproj/Main.storyboard @@ -1,6 +1,6 @@ - + @@ -13,29 +13,124 @@ - + - - + + - - + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -44,129 +139,144 @@ - + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - + + + + - - - - - + + + + + + @@ -189,6 +299,7 @@ + @@ -196,6 +307,7 @@ + @@ -210,14 +322,14 @@ - + - + @@ -236,15 +348,15 @@ - + - + - + @@ -266,7 +378,7 @@ - + @@ -284,7 +396,7 @@ - + @@ -302,7 +414,7 @@ - + diff --git a/PiBar for iOS/MainViewController.swift b/PiBar for iOS/MainViewController.swift index a73f5f7..dde7ef3 100644 --- a/PiBar for iOS/MainViewController.swift +++ b/PiBar for iOS/MainViewController.swift @@ -15,6 +15,7 @@ class MainViewController: UIViewController { didSet { DispatchQueue.main.async { self.tableView.reloadData() + self.tableView.layoutSubviews() } } } @@ -60,8 +61,8 @@ class MainViewController: UIViewController { override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() - tableView.contentInset.bottom = networkOverviewView.frame.height - 25 - tableView.scrollIndicatorInsets.bottom = networkOverviewView.frame.height - 60 + tableView.contentInset.bottom = networkOverviewView.frame.height - view.safeAreaInsets.bottom + tableView.scrollIndicatorInsets.bottom = networkOverviewView.frame.height - view.safeAreaInsets.bottom } @@ -96,8 +97,19 @@ extension MainViewController: UITableViewDataSource { } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - let cell = tableView.dequeueReusableCell(withIdentifier: "piholeCell", for: indexPath) + guard let piholes = networkOverview?.piholes else { + let cell = tableView.dequeueReusableCell(withIdentifier: "piholeCell", for: indexPath) + return cell + } + + let piholeIdentifiersAlphabetized: [String] = piholes.keys.sorted() + +// for identifier in piholeIdentifiersAlphabetized { + + let cell = tableView.dequeueReusableCell(withIdentifier: "piholeCell", for: indexPath) as! PiholeTableViewCell + + cell.pihole = piholes[piholeIdentifiersAlphabetized[indexPath.row]] return cell } diff --git a/PiBar for iOS/NetworkOverviewView.swift b/PiBar for iOS/NetworkOverviewView.swift index 52e6035..0178374 100644 --- a/PiBar for iOS/NetworkOverviewView.swift +++ b/PiBar for iOS/NetworkOverviewView.swift @@ -18,6 +18,7 @@ class NetworkOverviewView: UIView { @IBOutlet var avgBlocklistLabel: UILabel! @IBOutlet var disableButton: UIButton! + @IBOutlet var viewQueriesButton: UIButton! @IBAction func disableButtonAction(_ sender: UIButton) { let seconds = sender.tag > 0 ? sender.tag : nil @@ -30,7 +31,7 @@ class NetworkOverviewView: UIView { DispatchQueue.main.async { guard let networkOverview = self.networkOverview else { return } self.totalQueriesLabel.text = networkOverview.totalQueriesToday.string - self.blockedQueriesLabel.text = "\(networkOverview.adsBlockedToday.string) (\(networkOverview.adsPercentageToday.string))" + self.blockedQueriesLabel.text = networkOverview.adsBlockedToday.string self.networkStatusLabel.text = networkOverview.networkStatus.rawValue self.avgBlocklistLabel.text = networkOverview.averageBlocklist.string } @@ -41,6 +42,7 @@ class NetworkOverviewView: UIView { super.layoutSubviews() disableButton.layer.cornerRadius = disableButton.frame.height / 2 + viewQueriesButton.layer.cornerRadius = viewQueriesButton.frame.height / 2 } /* diff --git a/PiBar for iOS/PiholeTableViewCell.swift b/PiBar for iOS/PiholeTableViewCell.swift new file mode 100644 index 0000000..74134eb --- /dev/null +++ b/PiBar for iOS/PiholeTableViewCell.swift @@ -0,0 +1,56 @@ +// +// PiholeTableViewCell.swift +// PiBar for iOS +// +// Created by Brad Root on 6/3/20. +// Copyright © 2020 Brad Root. All rights reserved. +// + +import UIKit + +class PiholeTableViewCell: UITableViewCell { + + var pihole: Pihole? { + didSet { + DispatchQueue.main.async { + guard let pihole = self.pihole, let summary = pihole.summary else { return } + self.hostnameLabel.text = pihole.api.connection.hostname + self.totalQueriesLabel.text = summary.dnsQueriesToday.string + self.blockedQueriesLabel.text = summary.adsBlockedToday.string + self.blocklistLabel.text = summary.domainsBeingBlocked.string + self.currentStatusLabel.text = summary.status.capitalized + } + } + } + + @IBOutlet weak var hostnameLabel: UILabel! + @IBOutlet weak var currentStatusLabel: UILabel! + @IBOutlet weak var totalQueriesLabel: UILabel! + @IBOutlet weak var blockedQueriesLabel: UILabel! + @IBOutlet weak var blocklistLabel: UILabel! + + @IBOutlet weak var containerView: UIView! + + fileprivate func roundCorners() { + let cornerPath = UIBezierPath(roundedRect: containerView.bounds, byRoundingCorners: .allCorners, cornerRadii: CGSize(width: 20, height: 20)).cgPath + + let maskLayer = CAShapeLayer() + maskLayer.path = cornerPath + + containerView.layer.mask = maskLayer + containerView.clipsToBounds = true + } + + override func layoutSubviews() { + super.layoutSubviews() + + roundCorners() + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } + +} diff --git a/PiBar.xcodeproj/project.pbxproj b/PiBar.xcodeproj/project.pbxproj index 7440fc2..8fe1cbb 100644 --- a/PiBar.xcodeproj/project.pbxproj +++ b/PiBar.xcodeproj/project.pbxproj @@ -36,6 +36,7 @@ 44381850247DE41B009D9B3F /* AboutWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4438184F247DE41B009D9B3F /* AboutWindowController.swift */; }; 448C6F1C248746A2004C30BE /* NetworkOverviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 448C6F1B248746A2004C30BE /* NetworkOverviewView.swift */; }; 448C6F1E24874AF5004C30BE /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 448C6F1D24874AF5004C30BE /* MainViewController.swift */; }; + 448C6F202488286E004C30BE /* PiholeTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 448C6F1F2488286E004C30BE /* PiholeTableViewCell.swift */; }; 449395D62471ABD600FA0C34 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 449395D52471ABD600FA0C34 /* AppDelegate.swift */; }; 449395DA2471ABD700FA0C34 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 449395D92471ABD700FA0C34 /* Assets.xcassets */; }; 449395DD2471ABD700FA0C34 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 449395DB2471ABD700FA0C34 /* Main.storyboard */; }; @@ -85,6 +86,7 @@ 4438184F247DE41B009D9B3F /* AboutWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutWindowController.swift; sourceTree = ""; }; 448C6F1B248746A2004C30BE /* NetworkOverviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkOverviewView.swift; sourceTree = ""; }; 448C6F1D24874AF5004C30BE /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = ""; }; + 448C6F1F2488286E004C30BE /* PiholeTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PiholeTableViewCell.swift; sourceTree = ""; }; 449395D22471ABD600FA0C34 /* PiBar for macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "PiBar for macOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 449395D52471ABD600FA0C34 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 449395D92471ABD700FA0C34 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -145,6 +147,7 @@ 440DE4732482D37D00C55354 /* Info.plist */, 448C6F1B248746A2004C30BE /* NetworkOverviewView.swift */, 448C6F1D24874AF5004C30BE /* MainViewController.swift */, + 448C6F1F2488286E004C30BE /* PiholeTableViewCell.swift */, ); path = "PiBar for iOS"; sourceTree = ""; @@ -531,6 +534,7 @@ 440DE47F2482D59F00C55354 /* UpdatePiholeOperation.swift in Sources */, 440DE47D2482D59900C55354 /* PiBarManager.swift in Sources */, 440DE4642482D37D00C55354 /* AppDelegate.swift in Sources */, + 448C6F202488286E004C30BE /* PiholeTableViewCell.swift in Sources */, 440DE4802482D5A100C55354 /* ChangePiholeStatusOperation.swift in Sources */, 440DE4662482D37D00C55354 /* SceneDelegate.swift in Sources */, 440DE47C2482D59500C55354 /* Preferences.swift in Sources */, From 93aa41932a4e7b592fff38734adcdc7e0956c500 Mon Sep 17 00:00:00 2001 From: Brad Root Date: Wed, 3 Jun 2020 16:59:09 -0700 Subject: [PATCH 12/58] add some placeholder views --- PiBar for iOS/Base.lproj/Main.storyboard | 387 ++++++++++++----------- 1 file changed, 210 insertions(+), 177 deletions(-) diff --git a/PiBar for iOS/Base.lproj/Main.storyboard b/PiBar for iOS/Base.lproj/Main.storyboard index 1a7fc70..7cccc8d 100644 --- a/PiBar for iOS/Base.lproj/Main.storyboard +++ b/PiBar for iOS/Base.lproj/Main.storyboard @@ -1,6 +1,6 @@ - + @@ -21,98 +21,107 @@ - + - + - + - - + + - - - - - - - - - + + - - - + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + @@ -139,125 +148,149 @@ - + - + - + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - + + + @@ -353,10 +386,10 @@ - + - + From aa8cda37f46d864247df414817618333da1be747 Mon Sep 17 00:00:00 2001 From: Brad Root Date: Wed, 3 Jun 2020 17:07:54 -0700 Subject: [PATCH 13/58] some stack view fixes --- PiBar for iOS/Base.lproj/Main.storyboard | 96 ++++++++++++------------ 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/PiBar for iOS/Base.lproj/Main.storyboard b/PiBar for iOS/Base.lproj/Main.storyboard index 7cccc8d..a3db2a1 100644 --- a/PiBar for iOS/Base.lproj/Main.storyboard +++ b/PiBar for iOS/Base.lproj/Main.storyboard @@ -1,6 +1,6 @@ - + @@ -13,28 +13,28 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -148,31 +148,31 @@ - + - + - + - + - - + + - - + + - + - + - + - + - + - + - + - + @@ -317,7 +335,7 @@ - + - - + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + @@ -455,7 +666,7 @@ - + @@ -473,7 +684,7 @@ - + @@ -491,7 +702,7 @@ - + @@ -503,6 +714,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PiBar for iOS/MainViewController.swift b/PiBar for iOS/MainViewController.swift index 307fb5b..39c3978 100644 --- a/PiBar for iOS/MainViewController.swift +++ b/PiBar for iOS/MainViewController.swift @@ -107,6 +107,12 @@ extension MainViewController: UITableViewDataSource { let cell = tableView.dequeueReusableCell(withIdentifier: "piholeCell", for: indexPath) as! PiholeTableViewCell cell.pihole = piholes[piholeIdentifiersAlphabetized[indexPath.row]] + + if let overTimeData = networkOverview?.overTimeData, + let piholeData = overTimeData.piholes[piholeIdentifiersAlphabetized[indexPath.row]] { + cell.chartData = (overTimeData.maximumValue, piholeData) + } + return cell } diff --git a/PiBar for iOS/NetworkOverviewView.swift b/PiBar for iOS/NetworkOverviewView.swift index 9da914a..31b1355 100644 --- a/PiBar for iOS/NetworkOverviewView.swift +++ b/PiBar for iOS/NetworkOverviewView.swift @@ -56,61 +56,34 @@ class NetworkOverviewView: UIView { } func createChart() { - - chart.delegate = self - + // Chart setup chart.chartDescription?.enabled = false - chart.isUserInteractionEnabled = false - chart.leftAxis.drawLabelsEnabled = false chart.legend.enabled = false - chart.minOffset = 0 - chart.xAxis.drawGridLinesEnabled = false chart.leftAxis.drawGridLinesEnabled = false chart.leftAxis.axisMinimum = 0 chart.leftAxis.drawAxisLineEnabled = false chart.xAxis.drawAxisLineEnabled = false - chart.xAxis.enabled = false chart.leftAxis.enabled = false - - let xAxis = chart.xAxis xAxis.labelPosition = .bottom - chart.rightAxis.enabled = false chart.xAxis.drawLabelsEnabled = false + // Chart Data var yVals: [BarChartDataEntry] = [] - var x: Double = 0 - var batchCount: Int = 0 - var summedDomains: Double = 0.0 - var summedAds: Double = 0.0 - - if let domainsOverTime = networkOverview?.piholes["pi-hole.local"]?.overTimeData?.domainsOverTime, - let adsOverTime = networkOverview?.piholes["pi-hole.local"]?.overTimeData?.adsOverTime { - let sorted = domainsOverTime.sorted { $0.key < $1.key } - for (key, value) in sorted { - if batchCount == 5 { - let entry = BarChartDataEntry(x: x, yValues: [summedDomains, summedAds]) - yVals.append(entry) - x += 1 - summedDomains = 0 - summedAds = 0 - batchCount = 0 - } else { - summedDomains += Double(value) - summedAds += Double(adsOverTime[key]!) - batchCount += 1 - } - } - if !summedDomains.isZero || !summedAds.isZero { - let entry = BarChartDataEntry(x: x, yValues: [summedDomains, summedAds]) - yVals.append(entry) - } + + guard let dataOverTime = networkOverview?.overTimeData, !dataOverTime.overview.isEmpty else { return } + + let sorted = dataOverTime.overview.sorted { $0.key < $1.key } + + for (key, value) in sorted { + let entry = BarChartDataEntry(x: key, yValues: [value.0, value.1]) + yVals.append(entry) } if yVals.isEmpty { return } @@ -119,6 +92,7 @@ class NetworkOverviewView: UIView { if let set = chart.data?.dataSets.first as? BarChartDataSet { set1 = set set1.replaceEntries(yVals) + chart.leftAxis.axisMaximum = dataOverTime.maximumValue chart.data?.notifyDataChanged() chart.notifyDataSetChanged() } else { @@ -127,6 +101,8 @@ class NetworkOverviewView: UIView { set1.colors = [UIColor(named: "red") ?? .systemRed, .darkGray] set1.drawValuesEnabled = false + chart.leftAxis.axisMaximum = dataOverTime.maximumValue + let data = BarChartData(dataSet: set1) data.barWidth = 0.8 chart.data = data @@ -142,7 +118,3 @@ class NetworkOverviewView: UIView { */ } - -extension NetworkOverviewView: ChartViewDelegate { - -} diff --git a/PiBar for iOS/PiholeTableViewCell.swift b/PiBar for iOS/PiholeTableViewCell.swift index 30241f2..c7584fb 100644 --- a/PiBar for iOS/PiholeTableViewCell.swift +++ b/PiBar for iOS/PiholeTableViewCell.swift @@ -7,6 +7,7 @@ // import UIKit +import Charts class PiholeTableViewCell: UITableViewCell { @@ -19,8 +20,14 @@ class PiholeTableViewCell: UITableViewCell { self.blockedQueriesLabel.text = summary.adsBlockedToday.string self.blocklistLabel.text = summary.domainsBeingBlocked.string self.currentStatusLabel.text = summary.status.capitalized + } + } + } -// guard let overTimeData = pihole.overTimeData else { return } + var chartData: (Double, [Double: (Double, Double)]) = (0, [:]) { + didSet { + DispatchQueue.main.async { + self.setupChart() } } } @@ -33,6 +40,8 @@ class PiholeTableViewCell: UITableViewCell { @IBOutlet weak var containerView: UIView! + @IBOutlet weak var chart: BarChartView! + fileprivate func roundCorners() { let maskLayer = CAShapeLayer() maskLayer.path = UIBezierPath(roundedRect: containerView.bounds, byRoundingCorners: .allCorners, cornerRadii: CGSize(width: 15, height: 15)).cgPath @@ -52,4 +61,59 @@ class PiholeTableViewCell: UITableViewCell { // Configure the view for the selected state } + func setupChart() { + if chartData.1.isEmpty { return } + + // Chart setup + chart.chartDescription?.enabled = false + chart.isUserInteractionEnabled = false + chart.leftAxis.drawLabelsEnabled = false + chart.legend.enabled = false + chart.minOffset = 0 + chart.xAxis.drawGridLinesEnabled = false + chart.leftAxis.drawGridLinesEnabled = false + chart.leftAxis.axisMinimum = 0 + chart.leftAxis.drawAxisLineEnabled = false + chart.xAxis.drawAxisLineEnabled = false + chart.xAxis.enabled = false + chart.leftAxis.enabled = false + let xAxis = chart.xAxis + xAxis.labelPosition = .bottom + chart.rightAxis.enabled = false + chart.xAxis.drawLabelsEnabled = false + + // Chart Data + var yVals: [BarChartDataEntry] = [] + + let sorted = chartData.1.sorted { $0.key < $1.key } + + for (key, value) in sorted { + let entry = BarChartDataEntry(x: key, yValues: [value.0, value.1]) + yVals.append(entry) + } + + if yVals.isEmpty { return } + + var set1: BarChartDataSet! = nil + if let set = chart.data?.dataSets.first as? BarChartDataSet { + set1 = set + set1.replaceEntries(yVals) +// chart.leftAxis.axisMaximum = chartData.0 + chart.data?.notifyDataChanged() + chart.notifyDataSetChanged() + } else { + set1 = BarChartDataSet(entries: yVals) + set1.label = "Queries Over Time" + set1.colors = [UIColor(named: "red") ?? .systemRed, .darkGray] + set1.drawValuesEnabled = false + +// chart.leftAxis.axisMaximum = chartData.0 + + let data = BarChartData(dataSet: set1) + data.barWidth = 0.8 + chart.data = data + } + + } + } From 660761f4749e5179ebd25afaafc39ea930f3eb22 Mon Sep 17 00:00:00 2001 From: Brad Root Date: Fri, 5 Jun 2020 13:50:40 -0700 Subject: [PATCH 18/58] refactor charts --- PiBar for iOS/Base.lproj/Main.storyboard | 18 +++--- PiBar for iOS/NetworkOverviewView.swift | 56 ++---------------- PiBar for iOS/PiBarChartView.swift | 74 ++++++++++++++++++++++++ PiBar for iOS/PiholeTableViewCell.swift | 58 ++----------------- PiBar.xcodeproj/project.pbxproj | 4 ++ Pods/Pods.xcodeproj/project.pbxproj | 23 +++----- 6 files changed, 103 insertions(+), 130 deletions(-) create mode 100644 PiBar for iOS/PiBarChartView.swift diff --git a/PiBar for iOS/Base.lproj/Main.storyboard b/PiBar for iOS/Base.lproj/Main.storyboard index 7815118..f976f38 100644 --- a/PiBar for iOS/Base.lproj/Main.storyboard +++ b/PiBar for iOS/Base.lproj/Main.storyboard @@ -123,7 +123,7 @@ - + @@ -183,7 +183,7 @@ - + @@ -275,7 +275,7 @@ - + @@ -436,7 +436,7 @@ - + @@ -658,7 +658,7 @@ - + @@ -694,7 +694,7 @@ - + @@ -712,7 +712,7 @@ - + @@ -741,7 +741,7 @@ - + @@ -759,7 +759,7 @@ - + diff --git a/PiBar for iOS/NetworkOverviewView.swift b/PiBar for iOS/NetworkOverviewView.swift index 31b1355..065757a 100644 --- a/PiBar for iOS/NetworkOverviewView.swift +++ b/PiBar for iOS/NetworkOverviewView.swift @@ -21,7 +21,7 @@ class NetworkOverviewView: UIView { @IBOutlet var disableButton: UIButton! @IBOutlet var viewQueriesButton: UIButton! - @IBOutlet var chart: BarChartView! + @IBOutlet var chart: PiBarChartView! @IBAction func disableButtonAction(_ sender: UIButton) { let seconds = sender.tag > 0 ? sender.tag : nil @@ -37,7 +37,7 @@ class NetworkOverviewView: UIView { self.blockedQueriesLabel.text = networkOverview.adsBlockedToday.string self.networkStatusLabel.text = networkOverview.networkStatus.rawValue self.avgBlocklistLabel.text = networkOverview.averageBlocklist.string - self.createChart() + self.updateChart() } } } @@ -55,58 +55,10 @@ class NetworkOverviewView: UIView { } - func createChart() { - // Chart setup - chart.chartDescription?.enabled = false - chart.isUserInteractionEnabled = false - chart.leftAxis.drawLabelsEnabled = false - chart.legend.enabled = false - chart.minOffset = 0 - chart.xAxis.drawGridLinesEnabled = false - chart.leftAxis.drawGridLinesEnabled = false - chart.leftAxis.axisMinimum = 0 - chart.leftAxis.drawAxisLineEnabled = false - chart.xAxis.drawAxisLineEnabled = false - chart.xAxis.enabled = false - chart.leftAxis.enabled = false - let xAxis = chart.xAxis - xAxis.labelPosition = .bottom - chart.rightAxis.enabled = false - chart.xAxis.drawLabelsEnabled = false - + func updateChart() { // Chart Data - var yVals: [BarChartDataEntry] = [] - guard let dataOverTime = networkOverview?.overTimeData, !dataOverTime.overview.isEmpty else { return } - - let sorted = dataOverTime.overview.sorted { $0.key < $1.key } - - for (key, value) in sorted { - let entry = BarChartDataEntry(x: key, yValues: [value.0, value.1]) - yVals.append(entry) - } - - if yVals.isEmpty { return } - - var set1: BarChartDataSet! = nil - if let set = chart.data?.dataSets.first as? BarChartDataSet { - set1 = set - set1.replaceEntries(yVals) - chart.leftAxis.axisMaximum = dataOverTime.maximumValue - chart.data?.notifyDataChanged() - chart.notifyDataSetChanged() - } else { - set1 = BarChartDataSet(entries: yVals) - set1.label = "Queries Over Time" - set1.colors = [UIColor(named: "red") ?? .systemRed, .darkGray] - set1.drawValuesEnabled = false - - chart.leftAxis.axisMaximum = dataOverTime.maximumValue - - let data = BarChartData(dataSet: set1) - data.barWidth = 0.8 - chart.data = data - } + chart.loadDataOverTime(dataOverTime.overview, maxValue: dataOverTime.maximumValue) } /* diff --git a/PiBar for iOS/PiBarChartView.swift b/PiBar for iOS/PiBarChartView.swift new file mode 100644 index 0000000..1f45cd9 --- /dev/null +++ b/PiBar for iOS/PiBarChartView.swift @@ -0,0 +1,74 @@ +// +// PiBarChartView.swift +// PiBar for iOS +// +// Created by Brad Root on 6/5/20. +// Copyright © 2020 Brad Root. All rights reserved. +// + +import Charts + +class PiBarChartView: BarChartView { + override init(frame: CGRect) { + super.init(frame: frame) + setupChartPreferences() + } + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + setupChartPreferences() + } + + func setupChartPreferences() { + // Chart setup + chartDescription?.enabled = false + isUserInteractionEnabled = false + legend.enabled = false + minOffset = 0 + + xAxis.drawGridLinesEnabled = false + xAxis.drawAxisLineEnabled = false + xAxis.drawLabelsEnabled = false + xAxis.enabled = false + + leftAxis.enabled = false + leftAxis.drawGridLinesEnabled = false + leftAxis.axisMinimum = 0 + leftAxis.drawAxisLineEnabled = false + leftAxis.drawLabelsEnabled = false + + rightAxis.enabled = false + } + + func loadDataOverTime(_ dataOverTime: [Double : (Double, Double)], maxValue: Double) { + var yVals: [BarChartDataEntry] = [] + let sorted = dataOverTime.sorted { $0.key < $1.key } + + for (key, value) in sorted { + let entry = BarChartDataEntry(x: key, yValues: [value.0, value.1]) + yVals.append(entry) + } + + if yVals.isEmpty { return } + + var set1: BarChartDataSet! = nil + if let set = data?.dataSets.first as? BarChartDataSet { + set1 = set + set1.replaceEntries(yVals) + leftAxis.axisMaximum = maxValue + data?.notifyDataChanged() + notifyDataSetChanged() + } else { + set1 = BarChartDataSet(entries: yVals) + set1.label = "Queries Over Time" + set1.colors = [UIColor(named: "red") ?? .systemRed, .darkGray] + set1.drawValuesEnabled = false + + leftAxis.axisMaximum = maxValue + + let barChartData = BarChartData(dataSet: set1) + barChartData.barWidth = 0.8 + data = barChartData + } + } +} diff --git a/PiBar for iOS/PiholeTableViewCell.swift b/PiBar for iOS/PiholeTableViewCell.swift index c7584fb..98f781d 100644 --- a/PiBar for iOS/PiholeTableViewCell.swift +++ b/PiBar for iOS/PiholeTableViewCell.swift @@ -27,7 +27,7 @@ class PiholeTableViewCell: UITableViewCell { var chartData: (Double, [Double: (Double, Double)]) = (0, [:]) { didSet { DispatchQueue.main.async { - self.setupChart() + self.updateChart() } } } @@ -40,7 +40,7 @@ class PiholeTableViewCell: UITableViewCell { @IBOutlet weak var containerView: UIView! - @IBOutlet weak var chart: BarChartView! + @IBOutlet weak var chart: PiBarChartView! fileprivate func roundCorners() { let maskLayer = CAShapeLayer() @@ -61,59 +61,9 @@ class PiholeTableViewCell: UITableViewCell { // Configure the view for the selected state } - func setupChart() { + func updateChart() { if chartData.1.isEmpty { return } - - // Chart setup - chart.chartDescription?.enabled = false - chart.isUserInteractionEnabled = false - chart.leftAxis.drawLabelsEnabled = false - chart.legend.enabled = false - chart.minOffset = 0 - chart.xAxis.drawGridLinesEnabled = false - chart.leftAxis.drawGridLinesEnabled = false - chart.leftAxis.axisMinimum = 0 - chart.leftAxis.drawAxisLineEnabled = false - chart.xAxis.drawAxisLineEnabled = false - chart.xAxis.enabled = false - chart.leftAxis.enabled = false - let xAxis = chart.xAxis - xAxis.labelPosition = .bottom - chart.rightAxis.enabled = false - chart.xAxis.drawLabelsEnabled = false - - // Chart Data - var yVals: [BarChartDataEntry] = [] - - let sorted = chartData.1.sorted { $0.key < $1.key } - - for (key, value) in sorted { - let entry = BarChartDataEntry(x: key, yValues: [value.0, value.1]) - yVals.append(entry) - } - - if yVals.isEmpty { return } - - var set1: BarChartDataSet! = nil - if let set = chart.data?.dataSets.first as? BarChartDataSet { - set1 = set - set1.replaceEntries(yVals) -// chart.leftAxis.axisMaximum = chartData.0 - chart.data?.notifyDataChanged() - chart.notifyDataSetChanged() - } else { - set1 = BarChartDataSet(entries: yVals) - set1.label = "Queries Over Time" - set1.colors = [UIColor(named: "red") ?? .systemRed, .darkGray] - set1.drawValuesEnabled = false - -// chart.leftAxis.axisMaximum = chartData.0 - - let data = BarChartData(dataSet: set1) - data.barWidth = 0.8 - chart.data = data - } - + chart.loadDataOverTime(chartData.1, maxValue: chartData.0) } } diff --git a/PiBar.xcodeproj/project.pbxproj b/PiBar.xcodeproj/project.pbxproj index 6b64435..ff48654 100644 --- a/PiBar.xcodeproj/project.pbxproj +++ b/PiBar.xcodeproj/project.pbxproj @@ -35,6 +35,7 @@ 442F6F8B24721523008F1101 /* PreferencesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 442F6F8A24721523008F1101 /* PreferencesViewController.swift */; }; 4438184E247DE31A009D9B3F /* AboutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4438184D247DE31A009D9B3F /* AboutViewController.swift */; }; 44381850247DE41B009D9B3F /* AboutWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4438184F247DE41B009D9B3F /* AboutWindowController.swift */; }; + 444821DE248AE1C000665395 /* PiBarChartView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 444821DD248AE1C000665395 /* PiBarChartView.swift */; }; 448C6F1C248746A2004C30BE /* NetworkOverviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 448C6F1B248746A2004C30BE /* NetworkOverviewView.swift */; }; 448C6F1E24874AF5004C30BE /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 448C6F1D24874AF5004C30BE /* MainViewController.swift */; }; 448C6F202488286E004C30BE /* PiholeTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 448C6F1F2488286E004C30BE /* PiholeTableViewCell.swift */; }; @@ -85,6 +86,7 @@ 442F6F8A24721523008F1101 /* PreferencesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreferencesViewController.swift; sourceTree = ""; }; 4438184D247DE31A009D9B3F /* AboutViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutViewController.swift; sourceTree = ""; }; 4438184F247DE41B009D9B3F /* AboutWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutWindowController.swift; sourceTree = ""; }; + 444821DD248AE1C000665395 /* PiBarChartView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PiBarChartView.swift; sourceTree = ""; }; 448C6F1B248746A2004C30BE /* NetworkOverviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkOverviewView.swift; sourceTree = ""; }; 448C6F1D24874AF5004C30BE /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = ""; }; 448C6F1F2488286E004C30BE /* PiholeTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PiholeTableViewCell.swift; sourceTree = ""; }; @@ -155,6 +157,7 @@ 448C6F1B248746A2004C30BE /* NetworkOverviewView.swift */, 448C6F1D24874AF5004C30BE /* MainViewController.swift */, 448C6F1F2488286E004C30BE /* PiholeTableViewCell.swift */, + 444821DD248AE1C000665395 /* PiBarChartView.swift */, ); path = "PiBar for iOS"; sourceTree = ""; @@ -575,6 +578,7 @@ files = ( 448C6F1C248746A2004C30BE /* NetworkOverviewView.swift in Sources */, 448C6F1E24874AF5004C30BE /* MainViewController.swift in Sources */, + 444821DE248AE1C000665395 /* PiBarChartView.swift in Sources */, 440DE4782482D58B00C55354 /* Extensions.swift in Sources */, 440DE47E2482D59C00C55354 /* AsyncOperation.swift in Sources */, 440DE4792482D58D00C55354 /* Logging.swift in Sources */, diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj index 76bc008..f106f5a 100644 --- a/Pods/Pods.xcodeproj/project.pbxproj +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -15,6 +15,7 @@ dependencies = ( ); name = "SwiftLint-iOS"; + productName = "SwiftLint-iOS"; }; 9F0E6E0C8BF75091EADD98FA13B1A847 /* SwiftLint-macOS */ = { isa = PBXAggregateTarget; @@ -24,6 +25,7 @@ dependencies = ( ); name = "SwiftLint-macOS"; + productName = "SwiftLint-macOS"; }; /* End PBXAggregateTarget section */ @@ -313,7 +315,7 @@ 711AC91C488BD504E029B6291ED7CC85 /* ChartDataProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ChartDataProvider.swift; path = Source/Charts/Interfaces/ChartDataProvider.swift; sourceTree = ""; }; 7378111D9560C5E98B0B95AF0F67461B /* LineRadarRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LineRadarRenderer.swift; path = Source/Charts/Renderers/LineRadarRenderer.swift; sourceTree = ""; }; 7563D9353E9BF0AC1CC19D8CDE58CFAC /* BubbleChartView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BubbleChartView.swift; path = Source/Charts/Charts/BubbleChartView.swift; sourceTree = ""; }; - 7E24678C6B1E49C2024EC300DB731F51 /* Pods_PiBar_for_macOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_PiBar_for_macOS.framework; path = "Pods-PiBar for macOS.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 7E24678C6B1E49C2024EC300DB731F51 /* Pods_PiBar_for_macOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PiBar_for_macOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 81CAD649D17F3E160C64BE89A140E986 /* ChevronDownShapeRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ChevronDownShapeRenderer.swift; path = Source/Charts/Renderers/Scatter/ChevronDownShapeRenderer.swift; sourceTree = ""; }; 82BF88949AD6C4860FC1A6C545B73484 /* MoveViewJob.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoveViewJob.swift; path = Source/Charts/Jobs/MoveViewJob.swift; sourceTree = ""; }; 83284BAFFC99DA4BDE43C336ECA3A765 /* HorizontalBarChartRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HorizontalBarChartRenderer.swift; path = Source/Charts/Renderers/HorizontalBarChartRenderer.swift; sourceTree = ""; }; @@ -326,7 +328,7 @@ 907823E94DFCC439CBE000E0DF34B873 /* CombinedChartDataProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CombinedChartDataProvider.swift; path = Source/Charts/Interfaces/CombinedChartDataProvider.swift; sourceTree = ""; }; 90F689617DB535EFA72FB84EF7D6B851 /* CircleShapeRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CircleShapeRenderer.swift; path = Source/Charts/Renderers/Scatter/CircleShapeRenderer.swift; sourceTree = ""; }; 9151D7F121CB0A7AA14C4E1A998292A8 /* CombinedChartRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CombinedChartRenderer.swift; path = Source/Charts/Renderers/CombinedChartRenderer.swift; sourceTree = ""; }; - 921C052C34B3D2E3C8EDC80C9C9706BA /* Pods_PiBar_for_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_PiBar_for_iOS.framework; path = "Pods-PiBar for iOS.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 921C052C34B3D2E3C8EDC80C9C9706BA /* Pods_PiBar_for_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PiBar_for_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 94327B674E713647F8EA01260F95CBFA /* RadarChartRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RadarChartRenderer.swift; path = Source/Charts/Renderers/RadarChartRenderer.swift; sourceTree = ""; }; 9445753CB81AE0B68A4C5FFCA2C40C26 /* PieRadarHighlighter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PieRadarHighlighter.swift; path = Source/Charts/Highlight/PieRadarHighlighter.swift; sourceTree = ""; }; 94A5C32B9668A5AA30811484A9D87755 /* Platform+Graphics.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Platform+Graphics.swift"; path = "Source/Charts/Utils/Platform+Graphics.swift"; sourceTree = ""; }; @@ -335,9 +337,9 @@ 9802DF36DF676772550A3ADD37D8B03B /* ChartDataRendererBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ChartDataRendererBase.swift; path = Source/Charts/Renderers/ChartDataRendererBase.swift; sourceTree = ""; }; 98DA53EC25C12781C638CC02D8D10934 /* ScatterChartDataProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScatterChartDataProvider.swift; path = Source/Charts/Interfaces/ScatterChartDataProvider.swift; sourceTree = ""; }; 9D505BF8B5C7B2E44C792A960AED0B99 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; }; - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; A16AFDF3BFC323B14A3D741F03C6649B /* Renderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Renderer.swift; path = Source/Charts/Renderers/Renderer.swift; sourceTree = ""; }; - A1C1B977ED8804E8AEEC884E7359EE58 /* Charts.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Charts.framework; path = Charts.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A1C1B977ED8804E8AEEC884E7359EE58 /* Charts.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Charts.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A28B259EF5E09B69DB6A976AED8FB69D /* LineChartDataProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LineChartDataProvider.swift; path = Source/Charts/Interfaces/LineChartDataProvider.swift; sourceTree = ""; }; A46F5F9E574E9C142D41BBEEA183FD38 /* MarkerImage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MarkerImage.swift; path = Source/Charts/Components/MarkerImage.swift; sourceTree = ""; }; A613E745688FF02C525D10E8768C8471 /* RadarChartDataEntry.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RadarChartDataEntry.swift; path = Source/Charts/Data/Implementations/Standard/RadarChartDataEntry.swift; sourceTree = ""; }; @@ -403,7 +405,7 @@ F066DE17AF257744F13593C11AB3B414 /* BarChartRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BarChartRenderer.swift; path = Source/Charts/Renderers/BarChartRenderer.swift; sourceTree = ""; }; F1091D499CF4038119CC9CD9E9E14A98 /* TriangleShapeRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TriangleShapeRenderer.swift; path = Source/Charts/Renderers/Scatter/TriangleShapeRenderer.swift; sourceTree = ""; }; F31EFCCC9A4CA02BC3D8C8B9C1A90346 /* BarChartData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BarChartData.swift; path = Source/Charts/Data/Implementations/Standard/BarChartData.swift; sourceTree = ""; }; - F36B2E7BB4C3E92E4DF7443FAFF3AE3F /* HotKey.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = HotKey.framework; path = HotKey.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F36B2E7BB4C3E92E4DF7443FAFF3AE3F /* HotKey.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HotKey.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F9A1E4D59B5E97262EBD7772CB794554 /* ChartBaseDataSet.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ChartBaseDataSet.swift; path = Source/Charts/Data/Implementations/ChartBaseDataSet.swift; sourceTree = ""; }; FBFE3526033234DC9BC0B3FE05F43A94 /* Pods-PiBar for macOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-PiBar for macOS-umbrella.h"; sourceTree = ""; }; FD6FF5886BFE76D65CBC5AFB034D6B7F /* ChartDataEntry.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ChartDataEntry.swift; path = Source/Charts/Data/Implementations/Standard/ChartDataEntry.swift; sourceTree = ""; }; @@ -456,7 +458,6 @@ children = ( CF1734A99F7A041F5A5AA46EF3E79006 /* Support Files */, ); - name = SwiftLint; path = SwiftLint; sourceTree = ""; }; @@ -485,7 +486,6 @@ 444F78B73604CAD35ED26ACF855F2CCD /* NSEventModifierFlags+HotKey.swift */, 69A7CA0E3D910F6A07333D7304A3E74D /* Support Files */, ); - name = HotKey; path = HotKey; sourceTree = ""; }; @@ -714,7 +714,6 @@ B88CE38405696D2C0153B9302B7B091D /* Core */, 19CE0A6B4F7B271FF57FAC15078A6C65 /* Support Files */, ); - name = Charts; path = Charts; sourceTree = ""; }; @@ -896,7 +895,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1100; - LastUpgradeCheck = 1100; + LastUpgradeCheck = 1150; }; buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 10.0"; @@ -1164,7 +1163,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 09CFF440A13A62AE14A558484BC4B5D0 /* HotKey.release.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -1349,7 +1347,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 1C8C7BFEF056EC86C14852C4D2A08FF3 /* SwiftLint-macOS.release.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; @@ -1449,7 +1446,6 @@ baseConfigurationReference = DB3547D8AACEFE6671353ACE26F88A3A /* Pods-PiBar for macOS.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -1550,7 +1546,6 @@ baseConfigurationReference = F058BBA8A2B5559901468CC2B693EA26 /* Pods-PiBar for macOS.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -1606,7 +1601,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = CDF734830016E3088136D5243F547F5D /* HotKey.debug.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -1643,7 +1637,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = EE5B3CB181C3DDDDC24C0AFF87FAA8A9 /* SwiftLint-macOS.debug.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = "-"; From 7ab85ef9c390ca853c0bf737518f47518b6f619c Mon Sep 17 00:00:00 2001 From: Brad Root Date: Fri, 5 Jun 2020 15:13:05 -0700 Subject: [PATCH 19/58] make swiftlint happy --- .../Operations/UpdatePiholeOperation.swift | 10 +-- PiBar Shared/Manager/PiBarManager.swift | 8 +-- PiBar for iOS/AppDelegate.swift | 19 ++---- .../chartGridLines.colorset/Contents.json | 38 +++++++++++ PiBar for iOS/Base.lproj/Main.storyboard | 51 +++++++++----- PiBar for iOS/MainViewController.swift | 67 ++++++++----------- PiBar for iOS/NetworkOverviewView.swift | 25 +++---- PiBar for iOS/PiBarChartView.swift | 13 ++-- PiBar for iOS/PiholeTableViewCell.swift | 24 ++++--- PiBar for iOS/SceneDelegate.swift | 19 ++---- PiBar.xcodeproj/project.pbxproj | 19 ++++++ Pods/Charts/README.md | 7 +- .../Standard/BarChartDataSet.swift | 3 + .../Data/Interfaces/IBarChartDataSet.swift | 3 + .../Charts/Renderers/BarChartRenderer.swift | 56 +++++++++++++++- Pods/Local Podspecs/Charts.podspec.json | 33 +++++++++ 16 files changed, 277 insertions(+), 118 deletions(-) create mode 100644 PiBar for iOS/Assets.xcassets/chartGridLines.colorset/Contents.json create mode 100644 Pods/Local Podspecs/Charts.podspec.json diff --git a/PiBar Shared/Manager/Operations/UpdatePiholeOperation.swift b/PiBar Shared/Manager/Operations/UpdatePiholeOperation.swift index 53ed2c6..6e6e6c6 100644 --- a/PiBar Shared/Manager/Operations/UpdatePiholeOperation.swift +++ b/PiBar Shared/Manager/Operations/UpdatePiholeOperation.swift @@ -50,7 +50,7 @@ final class UpdatePiholeOperation: AsyncOperation { if summary.status != "enabled" { enabled = false } - if !self.pihole.api.connection.token.isEmpty || !self.pihole.api.connection.passwordProtected { + if !pihole.api.connection.token.isEmpty || !pihole.api.connection.passwordProtected { canBeManaged = true } } else { @@ -60,8 +60,8 @@ final class UpdatePiholeOperation: AsyncOperation { } let updatedPihole: Pihole = Pihole( - api: self.pihole.api, - identifier: self.pihole.api.identifier, + api: pihole.api, + identifier: pihole.api.identifier, online: online, summary: receivedSummary, overTimeData: receivedOverTimeData, @@ -69,8 +69,8 @@ final class UpdatePiholeOperation: AsyncOperation { enabled: enabled ) - self.pihole = updatedPihole + pihole = updatedPihole - self.state = .isFinished + state = .isFinished } } diff --git a/PiBar Shared/Manager/PiBarManager.swift b/PiBar Shared/Manager/PiBarManager.swift index d7db59f..4e7a88f 100644 --- a/PiBar Shared/Manager/PiBarManager.swift +++ b/PiBar Shared/Manager/PiBarManager.swift @@ -319,14 +319,14 @@ class PiBarManager: NSObject { return PiholeNetworkOverTimeData( overview: overview, maximumValue: maximumHourlyValue, - piholes: piholesOverTimeData) + piholes: piholesOverTimeData + ) } private func normalizeOverTimeData(_ pihole: Pihole) -> [Double: (Double, Double)] { var overTimeData: [Double: (Double, Double)] = [:] if let domainsOverTime = pihole.overTimeData?.domainsOverTime, let adsOverTime = pihole.overTimeData?.adsOverTime { - var hour: Double = 0 var batchCount: Int = 0 var summedDomains: Double = 0.0 @@ -340,7 +340,7 @@ class PiBarManager: NSObject { summedAds += Double(adsOverTime[key] ?? 0) batchCount += 1 } else { - overTimeData[hour] = (summedDomains, summedAds) + overTimeData[hour] = (summedDomains, summedAds) hour += 1 summedDomains = 0 summedAds = 0 @@ -348,7 +348,7 @@ class PiBarManager: NSObject { } } if !summedDomains.isZero || !summedAds.isZero { - overTimeData[hour] = (summedDomains, summedAds) + overTimeData[hour] = (summedDomains, summedAds) } } diff --git a/PiBar for iOS/AppDelegate.swift b/PiBar for iOS/AppDelegate.swift index 5b58799..76b6170 100644 --- a/PiBar for iOS/AppDelegate.swift +++ b/PiBar for iOS/AppDelegate.swift @@ -10,29 +10,24 @@ import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { - var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } // MARK: UISceneSession Lifecycle + @available(iOS 13.0, *) - func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { - // Called when a new scene session is being created. - // Use this method to select a configuration to create the new scene with. + func application( + _: UIApplication, + configurationForConnecting connectingSceneSession: UISceneSession, + options _: UIScene.ConnectionOptions) -> UISceneConfiguration { return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } @available(iOS 13.0, *) - func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { - // Called when the user discards a scene session. - // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. - // Use this method to release any resources that were specific to the discarded scenes, as they will not return. + func application(_: UIApplication, didDiscardSceneSessions _: Set) { } - - } - diff --git a/PiBar for iOS/Assets.xcassets/chartGridLines.colorset/Contents.json b/PiBar for iOS/Assets.xcassets/chartGridLines.colorset/Contents.json new file mode 100644 index 0000000..9c64f9f --- /dev/null +++ b/PiBar for iOS/Assets.xcassets/chartGridLines.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.800", + "green" : "0.800", + "red" : "0.800" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.200", + "green" : "0.200", + "red" : "0.200" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/PiBar for iOS/Base.lproj/Main.storyboard b/PiBar for iOS/Base.lproj/Main.storyboard index f976f38..3cdf64f 100644 --- a/PiBar for iOS/Base.lproj/Main.storyboard +++ b/PiBar for iOS/Base.lproj/Main.storyboard @@ -22,17 +22,17 @@ - + - + - + - + @@ -121,18 +121,25 @@ - + + + + + + + + - + - - + + @@ -178,16 +185,16 @@ - + - + - + - + @@ -273,18 +280,25 @@ - + + + + + + + + - + - - + + @@ -292,7 +306,7 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + @@ -710,24 +912,6 @@ - - - - - - - - - - - - - - - - - - @@ -775,6 +959,24 @@ + + + + + + + + + + + + + + + + + + @@ -784,10 +986,13 @@ - + + + + diff --git a/PiBar for iOS/Views/Extras/PiBarChartView.swift b/PiBar for iOS/Views/Extras/PiBarChartView.swift index c2edb2f..35e971d 100644 --- a/PiBar for iOS/Views/Extras/PiBarChartView.swift +++ b/PiBar for iOS/Views/Extras/PiBarChartView.swift @@ -60,7 +60,10 @@ class PiBarChartView: BarChartView { if let set = data?.dataSets.first as? BarChartDataSet { set1 = set set1.replaceEntries(yVals) + + // TODO: Tie into preferences leftAxis.axisMaximum = maxValue + data?.notifyDataChanged() notifyDataSetChanged() } else { @@ -69,6 +72,7 @@ class PiBarChartView: BarChartView { set1.colors = [UIColor(named: "red") ?? .systemRed, .darkGray] set1.drawValuesEnabled = false + // TODO: Tie into preferences leftAxis.axisMaximum = maxValue let barChartData = BarChartData(dataSet: set1) diff --git a/PiBar for iOS/Views/Main View/PiholeTableViewCell.swift b/PiBar for iOS/Views/Main View/PiholeTableViewCell.swift index f7bd90a..d15fb68 100644 --- a/PiBar for iOS/Views/Main View/PiholeTableViewCell.swift +++ b/PiBar for iOS/Views/Main View/PiholeTableViewCell.swift @@ -13,12 +13,20 @@ class PiholeTableViewCell: UITableViewCell { var pihole: Pihole? { didSet { DispatchQueue.main.async { - guard let pihole = self.pihole, let summary = pihole.summary else { return } + guard let pihole = self.pihole else { return } self.hostnameLabel.text = pihole.api.connection.hostname + + guard let summary = pihole.summary else { + self.totalQueriesLabel.text = "0" + self.blockedQueriesLabel.text = "0" + self.blocklistLabel.text = "0" + self.currentStatusLabel.text = "Offline" + return + } self.totalQueriesLabel.text = summary.dnsQueriesToday.string self.blockedQueriesLabel.text = summary.adsBlockedToday.string self.blocklistLabel.text = summary.domainsBeingBlocked.string - self.currentStatusLabel.text = summary.status.capitalized + self.currentStatusLabel.text = pihole.status.rawValue.capitalized } } } From f15a9d15d1cd07d4a2cb082ed8af73cc2d06ff6a Mon Sep 17 00:00:00 2001 From: Brad Root Date: Tue, 18 Aug 2020 21:29:11 -0700 Subject: [PATCH 22/58] reconfigure initial view state to be initializing state --- .../Views/Base.lproj/Main.storyboard | 79 +++++++------------ 1 file changed, 29 insertions(+), 50 deletions(-) diff --git a/PiBar for iOS/Views/Base.lproj/Main.storyboard b/PiBar for iOS/Views/Base.lproj/Main.storyboard index 6ac8e4e..79a9298 100644 --- a/PiBar for iOS/Views/Base.lproj/Main.storyboard +++ b/PiBar for iOS/Views/Base.lproj/Main.storyboard @@ -1,5 +1,5 @@ - + @@ -56,8 +56,8 @@ - diff --git a/PiBar for iOS/Views/Main View/PiBarChartView.swift b/PiBar for iOS/Views/Main View/PiBarChartView.swift index 35e971d..b4407bc 100644 --- a/PiBar for iOS/Views/Main View/PiBarChartView.swift +++ b/PiBar for iOS/Views/Main View/PiBarChartView.swift @@ -9,6 +9,9 @@ import Charts class PiBarChartView: BarChartView { + + var color: UIColor = UIColor(named: "red") ?? .systemRed + override init(frame: CGRect) { super.init(frame: frame) setupChartPreferences() @@ -69,7 +72,7 @@ class PiBarChartView: BarChartView { } else { set1 = BarChartDataSet(entries: yVals) set1.label = "Queries Over Time" - set1.colors = [UIColor(named: "red") ?? .systemRed, .darkGray] + set1.colors = [color, .darkGray] set1.drawValuesEnabled = false // TODO: Tie into preferences @@ -80,4 +83,22 @@ class PiBarChartView: BarChartView { data = barChartData } } + + func redrawChart() { + if let set = data?.dataSets.first as? BarChartDataSet { + set.colors = [color, .darkGray] + data?.notifyDataChanged() + notifyDataSetChanged() + } + } + + @objc dynamic var chartColor: UIColor { + get { + return color + } + set { + color = newValue + redrawChart() + } + } } diff --git a/PiBar for iOS/Views/PiBarLabel.swift b/PiBar for iOS/Views/PiBarLabel.swift new file mode 100644 index 0000000..3467201 --- /dev/null +++ b/PiBar for iOS/Views/PiBarLabel.swift @@ -0,0 +1,22 @@ +// +// PiBarLabel.swift +// PiBar for iOS +// +// Created by Brad Root on 8/25/20. +// Copyright © 2020 Brad Root. All rights reserved. +// + +import UIKit + +class PiBarLabel: UILabel { + + @objc dynamic var configurableTextColor: UIColor { + get { + return textColor + } + set { + textColor = newValue + } + } + +} diff --git a/PiBar for iOS/Views/Preferences/InterfaceColorTableViewController.swift b/PiBar for iOS/Views/Preferences/InterfaceColorTableViewController.swift new file mode 100644 index 0000000..d312789 --- /dev/null +++ b/PiBar for iOS/Views/Preferences/InterfaceColorTableViewController.swift @@ -0,0 +1,43 @@ +// +// InterfaceColorTableViewController.swift +// PiBar for iOS +// +// Created by Brad Root on 8/25/20. +// Copyright © 2020 Brad Root. All rights reserved. +// + +import UIKit + +class InterfaceColorTableViewController: UITableViewController { + + override func viewDidLoad() { + super.viewDidLoad() + } + + override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + switch indexPath.row { + case 0: + set(color: "red") + case 1: + set(color: "orange") + case 2: + set(color: "yellow") + case 3: + set(color: "green") + case 4: + set(color: "blue") + case 5: + set(color: "indigo") + case 6: + set(color: "violet") + default: + set(color: "red") + } + } +} + +extension InterfaceColorTableViewController { + fileprivate func set(color: String) { + ThemeManager.setColor(color: color) + } +} diff --git a/PiBar for iOS/Views/Preferences/PreferencesTableViewController.swift b/PiBar for iOS/Views/Preferences/PreferencesTableViewController.swift index 5e9eaaa..bce1aeb 100644 --- a/PiBar for iOS/Views/Preferences/PreferencesTableViewController.swift +++ b/PiBar for iOS/Views/Preferences/PreferencesTableViewController.swift @@ -10,10 +10,16 @@ import UIKit class PreferencesTableViewController: UITableViewController { + @IBOutlet weak var interfaceColorLabel: UILabel! + @IBAction func doneButtonAction(_ sender: UIBarButtonItem) { dismiss(animated: true, completion: nil) } + override func viewWillAppear(_ animated: Bool) { + interfaceColorLabel.text = Preferences.standard.interfaceColor.capitalized + } + override func viewDidLoad() { super.viewDidLoad() } diff --git a/PiBar.xcodeproj/project.pbxproj b/PiBar.xcodeproj/project.pbxproj index bdfd252..0f38970 100644 --- a/PiBar.xcodeproj/project.pbxproj +++ b/PiBar.xcodeproj/project.pbxproj @@ -48,6 +48,9 @@ 449395EE2471C47F00FA0C34 /* PiholeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 449395ED2471C47F00FA0C34 /* PiholeAPI.swift */; }; 44A69B2724ECE2D200B49EB2 /* AddDeviceTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44A69B2624ECE2D200B49EB2 /* AddDeviceTableViewController.swift */; }; 44B6DAF2247C70F500D364EC /* PiholeSettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44B6DAF1247C70F500D364EC /* PiholeSettingsViewController.swift */; }; + 44CD689424F5E3ED00115820 /* InterfaceColorTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44CD689324F5E3ED00115820 /* InterfaceColorTableViewController.swift */; }; + 44CD689624F5E96100115820 /* PiBarLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44CD689524F5E96100115820 /* PiBarLabel.swift */; }; + 44CD689824F5ED2B00115820 /* ThemeManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44CD689724F5ED2B00115820 /* ThemeManager.swift */; }; 44CF8F9824F4B538005A21B6 /* PreferencesTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44CF8F9724F4B538005A21B6 /* PreferencesTableViewController.swift */; }; 44FFB092247627B100DCEDEC /* PiBarManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44FFB091247627B100DCEDEC /* PiBarManager.swift */; }; D8E2BD45380E2681F4F7BF99 /* Pods_PiBar_for_macOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB442844C550DE69A8DE1422 /* Pods_PiBar_for_macOS.framework */; }; @@ -104,6 +107,9 @@ 449395ED2471C47F00FA0C34 /* PiholeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PiholeAPI.swift; sourceTree = ""; }; 44A69B2624ECE2D200B49EB2 /* AddDeviceTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddDeviceTableViewController.swift; sourceTree = ""; }; 44B6DAF1247C70F500D364EC /* PiholeSettingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PiholeSettingsViewController.swift; sourceTree = ""; }; + 44CD689324F5E3ED00115820 /* InterfaceColorTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InterfaceColorTableViewController.swift; sourceTree = ""; }; + 44CD689524F5E96100115820 /* PiBarLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PiBarLabel.swift; sourceTree = ""; }; + 44CD689724F5ED2B00115820 /* ThemeManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemeManager.swift; sourceTree = ""; }; 44CF8F9724F4B538005A21B6 /* PreferencesTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreferencesTableViewController.swift; sourceTree = ""; }; 44FFB091247627B100DCEDEC /* PiBarManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PiBarManager.swift; sourceTree = ""; }; 5D3D6C1A46DF2617F8C7B902 /* Pods-PiBar for iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PiBar for iOS.release.xcconfig"; path = "Target Support Files/Pods-PiBar for iOS/Pods-PiBar for iOS.release.xcconfig"; sourceTree = ""; }; @@ -158,6 +164,7 @@ 440DE4702482D37D00C55354 /* LaunchScreen.storyboard */, 440DE4732482D37D00C55354 /* Info.plist */, 444821E0248AFB2000665395 /* Views */, + 44CD689724F5ED2B00115820 /* ThemeManager.swift */, ); path = "PiBar for iOS"; sourceTree = ""; @@ -238,6 +245,7 @@ 444821E1248AFB3A00665395 /* Main View */, 44A69B2824ECE2DD00B49EB2 /* Add Device */, 44CF8F9624F4B4FE005A21B6 /* Preferences */, + 44CD689524F5E96100115820 /* PiBarLabel.swift */, ); path = Views; sourceTree = ""; @@ -317,6 +325,7 @@ isa = PBXGroup; children = ( 44CF8F9724F4B538005A21B6 /* PreferencesTableViewController.swift */, + 44CD689324F5E3ED00115820 /* InterfaceColorTableViewController.swift */, ); path = Preferences; sourceTree = ""; @@ -638,11 +647,14 @@ 44A69B2724ECE2D200B49EB2 /* AddDeviceTableViewController.swift in Sources */, 448C6F1E24874AF5004C30BE /* MainViewController.swift in Sources */, 444821DE248AE1C000665395 /* PiBarChartView.swift in Sources */, + 44CD689424F5E3ED00115820 /* InterfaceColorTableViewController.swift in Sources */, 440DE4782482D58B00C55354 /* Extensions.swift in Sources */, + 44CD689824F5ED2B00115820 /* ThemeManager.swift in Sources */, 440DE47E2482D59C00C55354 /* AsyncOperation.swift in Sources */, 440DE4792482D58D00C55354 /* Logging.swift in Sources */, 440DE47A2482D59000C55354 /* Structs.swift in Sources */, 440DE47B2482D59300C55354 /* PiholeAPI.swift in Sources */, + 44CD689624F5E96100115820 /* PiBarLabel.swift in Sources */, 440DE47F2482D59F00C55354 /* UpdatePiholeOperation.swift in Sources */, 440DE47D2482D59900C55354 /* PiBarManager.swift in Sources */, 440DE4642482D37D00C55354 /* AppDelegate.swift in Sources */, From e489a0fed138faf735dcaa683de90621156348aa Mon Sep 17 00:00:00 2001 From: Brad Root Date: Tue, 25 Aug 2020 18:36:36 -0700 Subject: [PATCH 40/58] swiftformat --- PiBar for iOS/ThemeManager.swift | 1 + .../Add Device/AddDeviceTableViewController.swift | 1 - PiBar for iOS/Views/Main View/PiBarChartView.swift | 13 ++++++------- PiBar for iOS/Views/PiBarLabel.swift | 4 +--- .../InterfaceColorTableViewController.swift | 3 +-- .../PreferencesTableViewController.swift | 10 ++++------ 6 files changed, 13 insertions(+), 19 deletions(-) diff --git a/PiBar for iOS/ThemeManager.swift b/PiBar for iOS/ThemeManager.swift index 214a975..18c2182 100644 --- a/PiBar for iOS/ThemeManager.swift +++ b/PiBar for iOS/ThemeManager.swift @@ -16,6 +16,7 @@ class ThemeManager { applyColor(color: foundColor) } } + static func setColor(color: String) { if let foundColor = UIColor(named: color) { Preferences.standard.set(interfaceColor: color) diff --git a/PiBar for iOS/Views/Add Device/AddDeviceTableViewController.swift b/PiBar for iOS/Views/Add Device/AddDeviceTableViewController.swift index 7666e71..856f62e 100644 --- a/PiBar for iOS/Views/Add Device/AddDeviceTableViewController.swift +++ b/PiBar for iOS/Views/Add Device/AddDeviceTableViewController.swift @@ -230,7 +230,6 @@ extension AddDeviceTableViewController { delegate?.updatedConnections() dismiss(animated: true, completion: nil) } - } extension UITextField { diff --git a/PiBar for iOS/Views/Main View/PiBarChartView.swift b/PiBar for iOS/Views/Main View/PiBarChartView.swift index b4407bc..07f2244 100644 --- a/PiBar for iOS/Views/Main View/PiBarChartView.swift +++ b/PiBar for iOS/Views/Main View/PiBarChartView.swift @@ -9,7 +9,6 @@ import Charts class PiBarChartView: BarChartView { - var color: UIColor = UIColor(named: "red") ?? .systemRed override init(frame: CGRect) { @@ -93,12 +92,12 @@ class PiBarChartView: BarChartView { } @objc dynamic var chartColor: UIColor { - get { - return color - } - set { + get { + return color + } + set { color = newValue redrawChart() - } - } + } + } } diff --git a/PiBar for iOS/Views/PiBarLabel.swift b/PiBar for iOS/Views/PiBarLabel.swift index 3467201..25a94e7 100644 --- a/PiBar for iOS/Views/PiBarLabel.swift +++ b/PiBar for iOS/Views/PiBarLabel.swift @@ -9,8 +9,7 @@ import UIKit class PiBarLabel: UILabel { - - @objc dynamic var configurableTextColor: UIColor { + @objc dynamic var configurableTextColor: UIColor { get { return textColor } @@ -18,5 +17,4 @@ class PiBarLabel: UILabel { textColor = newValue } } - } diff --git a/PiBar for iOS/Views/Preferences/InterfaceColorTableViewController.swift b/PiBar for iOS/Views/Preferences/InterfaceColorTableViewController.swift index d312789..a73f458 100644 --- a/PiBar for iOS/Views/Preferences/InterfaceColorTableViewController.swift +++ b/PiBar for iOS/Views/Preferences/InterfaceColorTableViewController.swift @@ -9,12 +9,11 @@ import UIKit class InterfaceColorTableViewController: UITableViewController { - override func viewDidLoad() { super.viewDidLoad() } - override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + override func tableView(_: UITableView, didSelectRowAt indexPath: IndexPath) { switch indexPath.row { case 0: set(color: "red") diff --git a/PiBar for iOS/Views/Preferences/PreferencesTableViewController.swift b/PiBar for iOS/Views/Preferences/PreferencesTableViewController.swift index bce1aeb..0593af7 100644 --- a/PiBar for iOS/Views/Preferences/PreferencesTableViewController.swift +++ b/PiBar for iOS/Views/Preferences/PreferencesTableViewController.swift @@ -9,14 +9,13 @@ import UIKit class PreferencesTableViewController: UITableViewController { + @IBOutlet var interfaceColorLabel: UILabel! - @IBOutlet weak var interfaceColorLabel: UILabel! - - @IBAction func doneButtonAction(_ sender: UIBarButtonItem) { + @IBAction func doneButtonAction(_: UIBarButtonItem) { dismiss(animated: true, completion: nil) } - override func viewWillAppear(_ animated: Bool) { + override func viewWillAppear(_: Bool) { interfaceColorLabel.text = Preferences.standard.interfaceColor.capitalized } @@ -31,9 +30,8 @@ class PreferencesTableViewController: UITableViewController { UIApplication.shared.open(URL(string: "https://reddit.com/r/pibar")!) } else if indexPath == IndexPath(row: 2, section: 2) { - UIApplication.shared.open(URL(string: "https://twitter.com/amiantos")!) + UIApplication.shared.open(URL(string: "https://twitter.com/amiantos")!) } tableView.deselectRow(at: indexPath, animated: true) } - } From 3be6167ab1893598cf9d7d92209610f523a947db Mon Sep 17 00:00:00 2001 From: Brad Root Date: Tue, 25 Aug 2020 18:38:36 -0700 Subject: [PATCH 41/58] appease the IB warning gods --- PiBar for iOS/Views/Base.lproj/Main.storyboard | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/PiBar for iOS/Views/Base.lproj/Main.storyboard b/PiBar for iOS/Views/Base.lproj/Main.storyboard index 193dff9..0168514 100644 --- a/PiBar for iOS/Views/Base.lproj/Main.storyboard +++ b/PiBar for iOS/Views/Base.lproj/Main.storyboard @@ -73,7 +73,7 @@