skip to Main Content

Xcode – Checking if location services are enabled. [Swift]

I am using the following observable object to track the users location: import Foundation import MapKit class LocationManager: NSObject, ObservableObject { private let locationManager = CLLocationManager() @Published var location: CLLocation? = nil override init() { super.init() self.locationManager.delegate = self self.locationManager.desiredAccuracy…

VIEW QUESTION
Back To Top
Search