From aab69797b0b101476d3c00607f5a40068ab4d893 Mon Sep 17 00:00:00 2001 From: Leslie Helou Date: Thu, 17 Sep 2026 14:48:42 -0400 Subject: [PATCH 01/10] Create TelemetryDeckConfig.swift --- .../TelemetryDeckConfig.swift | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Jamf Printer Manager/TelemetryDeckConfig.swift diff --git a/Jamf Printer Manager/TelemetryDeckConfig.swift b/Jamf Printer Manager/TelemetryDeckConfig.swift new file mode 100644 index 0000000..b4b7e74 --- /dev/null +++ b/Jamf Printer Manager/TelemetryDeckConfig.swift @@ -0,0 +1,31 @@ +// +// Copyright 2026, Jamf +// + +import TelemetryDeck + +struct TelemetryDeckConfig { + static let appId = "" + @MainActor static var parameters: [String: String] = [:] + @MainActor static var optOut: Bool = false +} + +extension AppDelegate { + @MainActor func configureTelemetryDeck() { + if !TelemetryDeckConfig.optOut { + let config = TelemetryDeck.Config(appID: TelemetryDeckConfig.appId) + TelemetryDeck.initialize(config: config) + } + } +} + +class TelemetryDeckSignal { + static let shared = TelemetryDeckSignal() + private init() {} + + @MainActor func send(_ event: String, parameters: [String: String] = [:]) { + if !TelemetryDeckConfig.optOut { + TelemetryDeck.signal(event, parameters: parameters) + } + } +} From 01738b1d311390c3c9d1faf2f6103043fb605fe3 Mon Sep 17 00:00:00 2001 From: Leslie Helou Date: Thu, 17 Sep 2026 17:47:31 -0400 Subject: [PATCH 02/10] Create codeql.yml --- .github/workflows/codeql.yml | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..3e4b0a3 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,42 @@ +name: CodeQL + + on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + schedule: + - cron: '0 8 * * 1' + + jobs: + analyze: + name: Analyze (swift) + runs-on: macos-latest + permissions: + security-events: write + actions: read + contents: read + + steps: + - uses: actions/checkout@v4 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: swift + build-mode: manual + + - name: Build + run: | + xcodebuild build \ + -project "Jamf Printer Manager.xcodeproj" \ + -target "Jamf Printer Manager" \ + -configuration Release \ + -derivedDataPath "$RUNNER_TEMP/DerivedData" \ + CODE_SIGNING_REQUIRED=NO \ + CODE_SIGNING_ALLOWED=NO + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: /language:swift From 77850eb01a8c071871d7d1c6d231a2ae7ec02089 Mon Sep 17 00:00:00 2001 From: Leslie Helou Date: Thu, 17 Sep 2026 18:13:05 -0400 Subject: [PATCH 03/10] Update codeql.yml --- .github/workflows/codeql.yml | 62 +++++++++++++++--------------------- 1 file changed, 26 insertions(+), 36 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 3e4b0a3..b1b4c7e 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,42 +1,32 @@ name: CodeQL - on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - schedule: - - cron: '0 8 * * 1' +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + schedule: + - cron: '0 8 * * 1' - jobs: - analyze: - name: Analyze (swift) - runs-on: macos-latest - permissions: - security-events: write - actions: read - contents: read +jobs: + analyze: + name: Analyze (swift) + runs-on: macos-latest + permissions: + security-events: write + actions: read + contents: read - steps: - - uses: actions/checkout@v4 + steps: + - uses: actions/checkout@v4 - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: swift - build-mode: manual + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: swift + build-mode: none - - name: Build - run: | - xcodebuild build \ - -project "Jamf Printer Manager.xcodeproj" \ - -target "Jamf Printer Manager" \ - -configuration Release \ - -derivedDataPath "$RUNNER_TEMP/DerivedData" \ - CODE_SIGNING_REQUIRED=NO \ - CODE_SIGNING_ALLOWED=NO - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: /language:swift + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: /language:swift From 73cd725d5cf337bca5836b8c4866a55fa1a8d923 Mon Sep 17 00:00:00 2001 From: Leslie Helou Date: Thu, 17 Sep 2026 18:21:27 -0400 Subject: [PATCH 04/10] Update codeql.yml --- .github/workflows/codeql.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index b1b4c7e..ada908d 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -24,7 +24,17 @@ jobs: uses: github/codeql-action/init@v3 with: languages: swift - build-mode: none + build-mode: manual + + - name: Build + run: | + xcodebuild build \ + -project "Jamf Printer Manager.xcodeproj" \ + -target "Jamf Printer Manager" \ + -configuration Release \ + -derivedDataPath "$RUNNER_TEMP/DerivedData" \ + CODE_SIGNING_REQUIRED=NO \ + CODE_SIGNING_ALLOWED=NO - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 From 2753eee87ad31d511a27448361f8a06a06beb378 Mon Sep 17 00:00:00 2001 From: Leslie Helou Date: Thu, 17 Sep 2026 19:01:19 -0400 Subject: [PATCH 05/10] Update codeql.yml --- .github/workflows/codeql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index ada908d..f901504 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -30,7 +30,7 @@ jobs: run: | xcodebuild build \ -project "Jamf Printer Manager.xcodeproj" \ - -target "Jamf Printer Manager" \ + -scheme "Jamf Printer Manager" \ -configuration Release \ -derivedDataPath "$RUNNER_TEMP/DerivedData" \ CODE_SIGNING_REQUIRED=NO \ From 5571662afae14cbdf2f618b681dc4fd8d665cee7 Mon Sep 17 00:00:00 2001 From: Leslie Helou Date: Thu, 17 Sep 2026 22:34:29 -0400 Subject: [PATCH 06/10] renamed --- .github/workflows/{codeql.yml => codeql-holder.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{codeql.yml => codeql-holder.yml} (100%) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql-holder.yml similarity index 100% rename from .github/workflows/codeql.yml rename to .github/workflows/codeql-holder.yml From b5a1e88eaf47b203604ec02fab4bd4fca31b03d9 Mon Sep 17 00:00:00 2001 From: Leslie Helou Date: Thu, 17 Sep 2026 22:45:28 -0400 Subject: [PATCH 07/10] cleanup --- .github/workflows/codeql-holder.yml | 1 + .gitignore | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codeql-holder.yml b/.github/workflows/codeql-holder.yml index f901504..b82e74a 100644 --- a/.github/workflows/codeql-holder.yml +++ b/.github/workflows/codeql-holder.yml @@ -40,3 +40,4 @@ jobs: uses: github/codeql-action/analyze@v3 with: category: /language:swift +r \ No newline at end of file diff --git a/.gitignore b/.gitignore index eae55d4..b92215a 100644 --- a/.gitignore +++ b/.gitignore @@ -145,10 +145,6 @@ Temporary Items # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - - - - ## Playgrounds timeline.xctimeline playground.xcworkspace @@ -208,3 +204,5 @@ Dependencies/ **/xcshareddata/WorkspaceSettings.xcsettings # End of https://www.toptal.com/developers/gitignore/api/swift,xcode,C,objective-c,osx + +**/Notes/ \ No newline at end of file From 3c0ce1eb293f3eb27f769dada92a679f4ee940e0 Mon Sep 17 00:00:00 2001 From: Leslie Helou Date: Thu, 17 Sep 2026 22:55:02 -0400 Subject: [PATCH 08/10] Delete codeql-holder.yml --- .github/workflows/codeql-holder.yml | 43 ----------------------------- 1 file changed, 43 deletions(-) delete mode 100644 .github/workflows/codeql-holder.yml diff --git a/.github/workflows/codeql-holder.yml b/.github/workflows/codeql-holder.yml deleted file mode 100644 index b82e74a..0000000 --- a/.github/workflows/codeql-holder.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: CodeQL - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - schedule: - - cron: '0 8 * * 1' - -jobs: - analyze: - name: Analyze (swift) - runs-on: macos-latest - permissions: - security-events: write - actions: read - contents: read - - steps: - - uses: actions/checkout@v4 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: swift - build-mode: manual - - - name: Build - run: | - xcodebuild build \ - -project "Jamf Printer Manager.xcodeproj" \ - -scheme "Jamf Printer Manager" \ - -configuration Release \ - -derivedDataPath "$RUNNER_TEMP/DerivedData" \ - CODE_SIGNING_REQUIRED=NO \ - CODE_SIGNING_ALLOWED=NO - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: /language:swift -r \ No newline at end of file From 935c8d8e63d821710e6d7fd26843d8b7643c3550 Mon Sep 17 00:00:00 2001 From: Leslie Helou Date: Fri, 18 Sep 2026 07:46:39 -0400 Subject: [PATCH 09/10] Update Globals.swift --- Jamf Printer Manager/Globals.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Jamf Printer Manager/Globals.swift b/Jamf Printer Manager/Globals.swift index a6debed..ce40464 100644 --- a/Jamf Printer Manager/Globals.swift +++ b/Jamf Printer Manager/Globals.swift @@ -5,7 +5,6 @@ import Cocoa import Foundation - var addedPrinterInfo = [PrinterInfo]() var bookmarkError = false var listOfCategories = [String]() From c46ec9b6b48420f814f938bb98b21ebd6a2e0012 Mon Sep 17 00:00:00 2001 From: Leslie Helou Date: Fri, 18 Sep 2026 07:49:46 -0400 Subject: [PATCH 10/10] clleanup --- Jamf Printer Manager/LoginVC.swift | 1 - Jamf Printer Manager/PrinterInfoTabVC.swift | 2 -- Jamf Printer Manager/PrinterInfoVC.swift | 2 -- 3 files changed, 5 deletions(-) diff --git a/Jamf Printer Manager/LoginVC.swift b/Jamf Printer Manager/LoginVC.swift index c092b2c..a051bf9 100644 --- a/Jamf Printer Manager/LoginVC.swift +++ b/Jamf Printer Manager/LoginVC.swift @@ -2,7 +2,6 @@ // Copyright 2026, Jamf // - import Cocoa import Foundation diff --git a/Jamf Printer Manager/PrinterInfoTabVC.swift b/Jamf Printer Manager/PrinterInfoTabVC.swift index 45e04fe..6863ea7 100644 --- a/Jamf Printer Manager/PrinterInfoTabVC.swift +++ b/Jamf Printer Manager/PrinterInfoTabVC.swift @@ -2,7 +2,6 @@ // Copyright 2026, Jamf // - import Cocoa import Foundation import UniformTypeIdentifiers @@ -17,7 +16,6 @@ class PrinterInfoTabVC: NSViewController, NSWindowDelegate, NSTextFieldDelegate, editPrinterInfo = newValues } - var delegate: UpdatePrinterInfoDelegate? = nil var newPrinterArray = [PrinterInfo]() diff --git a/Jamf Printer Manager/PrinterInfoVC.swift b/Jamf Printer Manager/PrinterInfoVC.swift index f7d2135..f40cbbd 100644 --- a/Jamf Printer Manager/PrinterInfoVC.swift +++ b/Jamf Printer Manager/PrinterInfoVC.swift @@ -2,11 +2,9 @@ // Copyright 2026, Jamf // - import Cocoa import Foundation - class PrinterInfoVC: NSTabViewController, NSWindowDelegate { var editPrinterInfo = PrinterInfo(id: "", name: "", category: "", uri: "", cups_name: "", location: "", model: "", make_default: "", shared: "", info: "", notes: "", use_generic: "", ppd: "", ppd_contents: "", ppd_path: "", os_req: "")