Commit c69ae15
002 add pppc keys (#151)
* AI generated removal of the big sur compatibility logic. Needs vetted and tested
* big-sur story/JPCFM-5531 Add minor changes to update minimum supported OS and remove remaining Big Sur things
* big-sur story/JPCFM-5531 Remove swiftlint disable call due to reduced file length
* big-sur story/JPCFM-5531 Add Copilot suggestion for generating test results
* big-sur story/JPCFM-5531 Add Copilot refactor to loadExecutable function
* big-sur story/JPCFM-5531 Remove code coverage addition
* added detailed plan for getting to swift 6 in stages
* Initial plan
* Stage 2: Convert NetworkAuthManager from actor to class
With SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor, all types are MainActor
by default. The actor's synchronization purpose (single-flight token
refresh) is now provided by MainActor serialization.
Changes:
- actor NetworkAuthManager → class NetworkAuthManager
- bearerAuthSupported(): drop async (no longer needed without actor)
- basicAuthString(): drop nonisolated (no longer an actor)
- JamfProAPIClient: drop await from bearerAuthSupported() calls
- NetworkAuthManagerTests: drop await from bearerAuthSupported() calls
Side effect: Resolves Token.isValid cross-isolation warning because
Token and NetworkAuthManager are now both on MainActor.
Agent-Logs-Url: https://github.com/jamf/PPPC-Utility/sessions/4235dbf5-feb0-4744-839d-543eee3b8ee5
Co-authored-by: watkyn <40115+watkyn@users.noreply.github.com>
* Stage 3a: Remove DispatchQueue.main.async wrappers
With MainActor default isolation, manual dispatch to the main thread
is redundant. All three locations are already MainActor-isolated.
Changes:
- Alert.swift: Remove DispatchQueue.main.async wrapper in display()
- OpenViewController.swift: Remove wrapper in tableView selectionIndexes
- SaveViewController.swift: Remove wrapper in savePressed panel callback
Agent-Logs-Url: https://github.com/jamf/PPPC-Utility/sessions/4235dbf5-feb0-4744-839d-543eee3b8ee5
Co-authored-by: watkyn <40115+watkyn@users.noreply.github.com>
* Stage 3b: Convert UploadManager to async throws
Replace Task/completion handler pattern with direct async throws methods.
Changes:
- UploadManager.verifyConnection: async throws -> VerificationInfo
- UploadManager.upload: async throws (no completion handler)
- UploadInfoView.verifyConnection: now async, uses try await
- UploadInfoView.performUpload: now async, uses try await
- Button action bridges to async with Task { await ... }
Agent-Logs-Url: https://github.com/jamf/PPPC-Utility/sessions/4235dbf5-feb0-4744-839d-543eee3b8ee5
Co-authored-by: watkyn <40115+watkyn@users.noreply.github.com>
* Stage 3c: Convert Model.loadExecutable to direct return
Replace completion handler pattern with throws -> Executable since the
work is synchronous (reads bundle info and code requirements).
Changes:
- Model.loadExecutable(url:) now throws -> Executable (no completion)
- Remove LoadExecutableCompletion typealias
- findExecutableOnComputerUsing → findExecutable, returns directly
- getExecutableFrom: uses do/catch instead of completion handler
- getAppleEventChoices: uses do/catch for each loadExecutable call
- TCCProfileViewController: promptForExecutables and acceptDrop updated
- OpenViewController.prompt: updated to use try/catch
Agent-Logs-Url: https://github.com/jamf/PPPC-Utility/sessions/4235dbf5-feb0-4744-839d-543eee3b8ee5
Co-authored-by: watkyn <40115+watkyn@users.noreply.github.com>
* Stage 3d: Convert TCCProfileImporter to direct return
Replace completion handler pattern with throws -> TCCProfile since
the work is synchronous (decode data, read file).
Changes:
- TCCProfileImporter.decodeTCCProfile(data:) now throws -> TCCProfile
- TCCProfileImporter.decodeTCCProfile(fileUrl:) now throws -> TCCProfile
- Remove TCCProfileImportCompletion typealias
- TCCProfileConfigurationPanel: uses try/catch in panel callback
- TCCProfileImporterTests: updated to use try/catch pattern
Agent-Logs-Url: https://github.com/jamf/PPPC-Utility/sessions/4235dbf5-feb0-4744-839d-543eee3b8ee5
Co-authored-by: watkyn <40115+watkyn@users.noreply.github.com>
* Stage 4: Add @Concurrent for background I/O
Mark SecurityWrapper and Model methods with @Concurrent to move disk
I/O and security operations off MainActor onto the cooperative pool.
Changes:
- SecurityWrapper.copyDesignatedRequirement: @Concurrent async throws
- SecurityWrapper.sign: @Concurrent async throws
- SecurityWrapper.loadSigningIdentities: @Concurrent async throws
- Model.loadExecutable: @Concurrent async throws -> Executable
- Model.getAppleEventChoices: now async (calls loadExecutable)
- Model.getExecutableFrom/findExecutable: now async
- Model.getExecutablesFromAllPolicies: now async
- Model.importProfile: now async
- All callers updated to use Task/await where needed
- ModelTests: updated to async test methods
Agent-Logs-Url: https://github.com/jamf/PPPC-Utility/sessions/4235dbf5-feb0-4744-839d-543eee3b8ee5
Co-authored-by: watkyn <40115+watkyn@users.noreply.github.com>
* Stage 5: Enable Swift 6 language mode
Flip SWIFT_VERSION from 5.0 to 6.0 so all concurrency warnings become
hard errors. Fix override isolation mismatches.
Changes:
- SWIFT_VERSION = 6.0 in all 4 build configurations
- SaveViewController.observeValue: add nonisolated + MainActor.assumeIsolated
- ModelTests.setUp: add nonisolated + MainActor.assumeIsolated
- Update plan document to reflect all stages complete
Agent-Logs-Url: https://github.com/jamf/PPPC-Utility/sessions/4235dbf5-feb0-4744-839d-543eee3b8ee5
Co-authored-by: watkyn <40115+watkyn@users.noreply.github.com>
* create-separate story/JPCFM-5564 Fix failing build and tests
* create-separate story/JPCFM-5564 Fix code signing mistake
* create-separate story/JPCFM-5564 Fix bad syntax in build settings
* create-separate story/JPCFM-5564 Fix bad syntax in project settings for last time
* create-separate story/JPCFM-5564 Try to fix failing tests on GH PR
* create-separate story/JPCFM-5564 Try to fix unit test check issue
* create-separate story/JPCFM-5564 Make actual change with the plan to fix Unit Test issues
* removed some uneeded concurrency annotations
* removed a couple more spots
* Update Source/SwiftUI/UploadInfoView.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* code review changes
* put the apple events selection back onto the main queue
* disabled the drop down until it is populated.
* fixed the sizing issue of the save window
* added width to the save prompt
* changed sequence of model on save
* reverted main story board
* added timing check for apple events loading
* reverted back to sync on the drag drop executables
* try macos 26
* fixed the upload crashes
* claude plan 1
* updated plan and claude.md
* added some simple unit test coverage that was missing
* Phase 2: URLSession injection + MockURLProtocol infrastructure
Production changes:
- Networking.swift: Add session:URLSession parameter (default .shared),
replace all 5 URLSession.shared calls with injected session
- JamfProAPIClient.swift: Replace URLSession.shared in HTML version
fallback with inherited session property
- UploadManager.swift: Add session:URLSession parameter, pass through
to JamfProAPIClient constructors
Test infrastructure:
- MockURLProtocol: Simple URLProtocol subclass with single static
requestHandler, URLSession.mock(handler:) convenience, and
HTTPURLResponse.ok/status helpers
- MockURLProtocolTests: 3 tests verifying interception, error status
codes, and reset behavior (.serialized suite)
Convention updates:
- CLAUDE.md: Add 'always use Swift Concurrency' rule, update mock
convention to serialized suites with simple static handler
- docs/plans: Matching updates to Phase 2 & 4 descriptions
No behavioral change — URLSession.shared remains the default for all
production paths. 69 tests pass, no new compiler warnings.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* added more networking unit tests
* Fix sendBearerAuthorized retry bug and add 401 retry tests
Agent-Logs-Url: https://github.com/jamf/PPPC-Utility/sessions/398e2e82-5660-412c-9150-b6c79a4bb21e
Co-authored-by: watkyn <40115+watkyn@users.noreply.github.com>
* Phase 4: Add UploadManager and TCCProfile XML tests
- New UploadManagerTests with verifyConnection tests (mustSign true/false,
credential errors, unavailability errors) and upload tests verifying
site XML presence/absence through the full network mock flow
- Expand TCCProfileTests with XML-parsing-based assertions for
jamfProAPIData structure, site element inclusion, and site exclusion
- 96 tests total, all passing, no new compiler warnings
- App target coverage: 45.03%
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* updated claude.md
* added ui testing plan
* added UI test framework and first test for the main window
* split the UI tests from the unit test
* fixed the project file ref
* trying out speckit on a feature
* finished implementing the spec
* added spec for the 3 new keys
* implemented the spec locally since the agent does not have xcode access
* addressed copilot comments (except the one about splitting the pr)
---------
Co-authored-by: JJ Pritzl <jj.pritzl@jamf.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: watkyn <40115+watkyn@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Mike Anderson <mike.anderson@jamf.com>1 parent 25166cd commit c69ae15
File tree
29 files changed
+2063
-149
lines changed- .specify
- memory
- PPPC Utility.xcodeproj
- PPPC UtilityTests
- Helpers
- ModelTests
- TCCProfileImporterTests
- PPPC UtilityUITests
- Resources
- Base.lproj
- Source
- Model
- View Controllers
- specs/002-add-pppc-keys
- checklists
29 files changed
+2063
-149
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
89 | | - | |
| 90 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
27 | 34 | | |
28 | 35 | | |
| 36 | + | |
29 | 37 | | |
30 | 38 | | |
31 | 39 | | |
| |||
35 | 43 | | |
36 | 44 | | |
37 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
38 | 54 | | |
39 | 55 | | |
40 | 56 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
| 155 | + | |
154 | 156 | | |
155 | 157 | | |
156 | 158 | | |
| |||
266 | 268 | | |
267 | 269 | | |
268 | 270 | | |
| 271 | + | |
269 | 272 | | |
270 | 273 | | |
271 | 274 | | |
| |||
536 | 539 | | |
537 | 540 | | |
538 | 541 | | |
| 542 | + | |
539 | 543 | | |
540 | 544 | | |
541 | 545 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
39 | 45 | | |
40 | | - | |
| 46 | + | |
41 | 47 | | |
42 | 48 | | |
43 | | - | |
| 49 | + | |
44 | 50 | | |
45 | 51 | | |
46 | | - | |
47 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
48 | 59 | | |
49 | | - | |
| 60 | + | |
50 | 61 | | |
51 | 62 | | |
52 | | - | |
| 63 | + | |
53 | 64 | | |
54 | 65 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 66 | + | |
| 67 | + | |
84 | 68 | | |
85 | 69 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | 70 | | |
90 | | - | |
91 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
92 | 94 | | |
93 | 95 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
275 | 283 | | |
276 | 284 | | |
277 | | - | |
| 285 | + | |
| 286 | + | |
278 | 287 | | |
279 | 288 | | |
280 | | - | |
| 289 | + | |
| 290 | + | |
281 | 291 | | |
282 | 292 | | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
| 293 | + | |
293 | 294 | | |
294 | | - | |
295 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
296 | 303 | | |
297 | 304 | | |
298 | 305 | | |
299 | | - | |
| 306 | + | |
300 | 307 | | |
301 | 308 | | |
302 | | - | |
| 309 | + | |
303 | 310 | | |
304 | 311 | | |
305 | 312 | | |
| |||
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
43 | 58 | | |
44 | 59 | | |
45 | 60 | | |
| |||
Lines changed: 25 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
76 | 100 | | |
77 | 101 | | |
78 | 102 | | |
| |||
Lines changed: 6 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
80 | 83 | | |
81 | 84 | | |
82 | 85 | | |
| |||
108 | 111 | | |
109 | 112 | | |
110 | 113 | | |
111 | | - | |
| 114 | + | |
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
| |||
141 | 144 | | |
142 | 145 | | |
143 | 146 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
| 147 | + | |
151 | 148 | | |
152 | 149 | | |
153 | 150 | | |
| |||
0 commit comments