I wrote a simple program that uses Cocoa definition services to get the user's current position. It works without problems on a MacBook Pro. However, this is not on a MacBook Air.
I stayed with the code Operation could not be completed. (kCLErrorDomain error 1.) Operation could not be completed. (kCLErrorDomain error 1.) , and I have already tried to fix many things (for example, setting permissions). By checking the box for the application in the privacy settings to enable location services for the application, it disappears as soon as I launch the application.
To initialize the services, I use the startUpdatingLocation method of the startUpdatingLocation class.
Is there any way to solve the problem?
source share