Failed to insert legal attribution from corner 4 quickly

I am new to Xcode and mobile app. I am making an application to find the current location. I tested it on a simulator and received this message in the console. "Cannot insert legal attribution from angle 4". What does this mean and how can I fix it?

import UIKit import Alamofire import AlamofireImage import MapKit import CoreLocation class MapVC: UIViewController @IBOutlet weak var mapView: MKMapView! var locationManager = CLLocationManager() let authorizationStatus = CLLocationManager.authorizationStatus() let regionRadius: Double = 1000 override func viewDidLoad() { super.viewDidLoad() mapView.delegate = self locationManager.delegate = self configureLocationServices() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } @IBAction func centerMapPressed(_ sender: Any) { if authorizationStatus == .authorizedAlways || authorizationStatus == .authorizedWhenInUse{ centerMapOnUserLocation() } } 

MKMapViewDelegate:

 func centerMapOnUserLocation(){ guard let coordinate = locationManager.location?.coordinate else{return} let coordinateRegion = MKCoordinateRegionMakeWithDistance(coordinate, regionRadius*2.0, regionRadius * 2.0 ) mapView.setRegion(coordinateRegion, animated: true) } 

CLLocationManagerDelegate:

 func configureLocationServices(){ if authorizationStatus == .notDetermined{ locationManager.requestAlwaysAuthorization() }else{ return} } func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) { centerMapOnUserLocation() } 
+7
ios swift4
source share
2 answers

When you open the simulator, go to the DEBUG menu on the top panel of the macro, the last option is the location, mine showed this error when installing NONE. Set it to "Custom Location", first of all, you will offer a custom location in a new window, fill it in, close the simulator and restart the application. Now it should get a custom location from your code. (andrecasarini loan)

+1
source share

You did not type an open brace for your MapVC class:

your code:

 class MapVC: UIViewController 

to fix it:

 class MapVC: UIViewController { 
+1
source share

All Articles