diff --git a/CHANGELOG.md b/CHANGELOG.md index e712bf422..5cda9e460 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### Fixes - Android: tapping the foreground service notification brings the app to the front. (#179) — thanks @Syhids - Cron tool passes `id` to the gateway for update/remove/run/runs (keeps `jobId` input). (#180) — thanks @adamgall +- macOS: treat location permission as always-only to avoid iOS-only enums. (#165) — thanks @Nachx639 ## 2026.1.4 diff --git a/apps/macos/Tests/ClawdbotIPCTests/PermissionManagerTests.swift b/apps/macos/Tests/ClawdbotIPCTests/PermissionManagerTests.swift index 1589813fc..d6c04d9e9 100644 --- a/apps/macos/Tests/ClawdbotIPCTests/PermissionManagerTests.swift +++ b/apps/macos/Tests/ClawdbotIPCTests/PermissionManagerTests.swift @@ -1,5 +1,6 @@ import Testing import ClawdbotIPC +import CoreLocation @testable import Clawdbot @Suite(.serialized) @@ -22,4 +23,16 @@ struct PermissionManagerTests { let ensured = await PermissionManager.ensure(caps, interactive: false) #expect(ensured.keys.count == caps.count) } + + @Test func locationStatusMatchesAuthorizationAlways() async { + let status = CLLocationManager().authorizationStatus + let results = await PermissionManager.status([.location]) + #expect(results[.location] == (status == .authorizedAlways)) + } + + @Test func ensureLocationNonInteractiveMatchesAuthorizationAlways() async { + let status = CLLocationManager().authorizationStatus + let ensured = await PermissionManager.ensure([.location], interactive: false) + #expect(ensured[.location] == (status == .authorizedAlways)) + } }