didFailWithError: Error Domain=kCLErrorDomain Code=0 “The operation couldn’t be

这个错误纠结我老半天了,最后还是通过官方文档解决(注意:部分地区不支持,正是这样才坑了我):

Simulating a Location at Launchtime
Specify the location a device or a simulator reports to your app on launch.

From the Scheme toolbar menu, choose the appropriate scheme.
From the same menu, choose Edit Scheme to display the scheme dialog.
In the left column, select the Run action.
From the Default Location pop-up menu, select a location.


 
Note: If the Default Location pop-up menu is dimmed, select the Allow Location Simulation option.

For information on the Application Data and Routing App Coverage File options, see the iOS Simulator User Guide.
Related Articles
About the Scheme Editing Dialog

猜你喜欢

转载自miclee.iteye.com/blog/2096707