didFailWithError: Error Domain=kCLErrorDomain Code=0 “The operation couldn’t be completed. (kCLError

I believe that many people have encountered this problem, the Internet is also by a variety of answers which this calculate more comprehensive
The reason for the error is the project — &gt in Xcode; The scheme – & gt; Edit scheme – & gt; The options – & gt; The core location – & gt; Error allowing location simulation;
solutions:

    if it is already set, uncheck it and save it; The simulator – & gt; Reset content and Settings: re-check allow location simulation, then reset content and Settings

Most people should have solved the problem, but I didn’t… And the solution is this

It’s not because I’m in Hong Kong. It’s because there’s only one Chinese in Hong Kong.
will not report an error after it is set. In fact, it is to specify the position of the simulator. I don’t know why the simulator cannot be automatically positioned, so I can test with the real machine

Learn iOS, he is enough, small code brother video, wisdom, dark horse, all kinds of Swift books

Read More: