Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot assign value of type 'AppDelegate' to type 'CLLocationManagerDelegate?'

I import CoreLocation, then add locationManager.delegate = self in didFinishLaunchingWithOptions and let locationManager = CLLocationManager() out of it.

But I have this error in AppDelegate. What do I wrong?

like image 642
aaisataev Avatar asked Mar 09 '16 18:03

aaisataev


1 Answers

You need to make your AppDelegate conform to CLLocationManagerDelegate.

class AppDelegate: UIApplicationDelegate, CLLocationManagerDelegate {}
like image 128
laynemoseley Avatar answered Sep 29 '22 15:09

laynemoseley