Quellcode
- 2022-01-26 01:30:30.386998+0100 GeolocationTracking[3158:157761] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated: failed at lookup with error 3 - No such process.}
Hier mein Code:
Quellcode
- @IBOutlet weak var mapView: GMSMapView!
- @IBOutlet weak var waypointsLabel: UILabel!
- let locationManager = CLLocationManager()
- var locationsList:[CLLocation] = []
- var userLocation: CLLocation?
- var destination: MKMapItem?
- override func viewDidLoad() {
- super.viewDidLoad()
- locationManager.delegate = self
- locationManager.desiredAccuracy = kCLLocationAccuracyBest
- locationManager.activityType = .automotiveNavigation
- locationManager.distanceFilter = 100
- locationManager.desiredAccuracy = 0
- locationManager.requestAlwaysAuthorization()
- self.mapView.isMyLocationEnabled = true
- }
- @IBAction func startTracking(_ sender: Any) {
- locationManager.startUpdatingLocation()
- }
- func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
- if let location = locations.last {
- self.mapView.camera = .init(latitude: location.coordinate.latitude, longitude: location.coordinate.longitude, zoom: 15.0)
- let marker = GMSMarker(position: location.coordinate)
- marker.map = mapView
- locationsList.append(location)
- }
- }
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von fabian1302 ()