diff options
Diffstat (limited to 'ios/Hæ-appen/LocationAuthorizer.swift')
| -rw-r--r-- | ios/Hæ-appen/LocationAuthorizer.swift | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ios/Hæ-appen/LocationAuthorizer.swift b/ios/Hæ-appen/LocationAuthorizer.swift new file mode 100644 index 0000000..fb6f3c8 --- /dev/null +++ b/ios/Hæ-appen/LocationAuthorizer.swift @@ -0,0 +1,20 @@ +// +// LocationAuthorizer.swift +// Hæ-appen +// +// Created by Ivar Løvlie on 16/10/2025. +// + +import SwiftUI +import MapKit +import CoreLocation + +final class LocationAuthorizer: NSObject, CLLocationManagerDelegate { + static let shared = LocationAuthorizer() + private let manager = CLLocationManager() + + func requestWhenInUse() { + manager.delegate = self + manager.requestWhenInUseAuthorization() + } +} |
