CLocationManager - how to call kCLErrorNetwork

I am trying to handle all of the various CLLocationManager error states, and I need to know how to cause the error:

kCLErrorNetwork

Status of documents:

kCLErrorNetwork - The network was unavailable or a network error occurred.

I decided that I could trigger this by turning on airplane mode, but that just gives me:

kCLErrorLocationUnknown - The location manager was unable to obtain a location value right now.

Does anyone know how to call kCLErrorNetwork?

Thank!

+3
source share
1 answer

Working in the simulator I had problems getting locations when I turned off location services in OS X, but I'm sure there were no error messages.

- . , .

-1

Source: https://habr.com/ru/post/1791416/


All Articles