mirror of
https://github.com/jayanezj/traccar-client-macos.git
synced 2026-11-05 03:00:46 +01:00
feat: add native local location capture (#4)
Add explicit permission handling, independent continuous and single capture, location status and deterministic CI coverage. Final decisions and validation: https://github.com/jayanezj/traccar-client-macos/issues/4#issuecomment-6399189792
This commit is contained in:
18 files changed
+1030
-38
No files matched your search
@@ -31,12 +31,12 @@ final class ConfigurationModel {
|
||||
self.beforeConnectionChange = beforeConnectionChange
|
||||
}
|
||||
|
||||
static func live() -> ConfigurationModel {
|
||||
ConfigurationModel(storage: PreferencesConfigurationStorage(
|
||||
preferences: .standard, connectionStorage: KeychainConnectionStorage(
|
||||
service: "\(Bundle.main.bundleIdentifier ?? "com.codigojose.traccar-client-macos").configuration"
|
||||
)
|
||||
))
|
||||
static func live(
|
||||
beforeConnectionChange: @escaping (ReceiverConnection, ReceiverConnection) throws -> Void = { _, _ in }
|
||||
) -> ConfigurationModel {
|
||||
ConfigurationModel(
|
||||
storage: PreferencesConfigurationStorage.live(), beforeConnectionChange: beforeConnectionChange
|
||||
)
|
||||
}
|
||||
|
||||
func loadIfNeeded() {
|
||||
@@ -83,7 +83,7 @@ final class ConfigurationModel {
|
||||
self.saved = candidate
|
||||
draft = candidate
|
||||
errorMessage = nil
|
||||
showStatus("Configuration saved locally. Tracking remains paused.")
|
||||
showStatus("Configuration saved locally. Saving does not start capture or send positions.")
|
||||
return true
|
||||
} catch {
|
||||
errorMessage = message(for: error)
|
||||
|
||||
Reference in new issue
Block a user