summaryrefslogtreecommitdiffstats
path: root/ios/Hæ-appen/LocationAuthorizer.swift
blob: fb6f3c8f469aedd35a546a3655dadb38841f74d3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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()
    }
}