CLocationManager - how to trigger kCLErrorNetwork
I'm trying to handle all of the different error states of CLLocationManager, and I need to know how to trigger the error:
kCLErrorNetwork
The docs state:
kCLErrorNetwork - The network was unavailable or a network error occurred.
I figured I could trigger this by turning Airplane mode on, but that just gives me:
kCLErrorLocationUnknown - The location manager was unable to o开发者_StackOverflow社区btain a location value right now.
Anybody know how to trigger kCLErrorNetwork?
Thanks!
Working in the simulator I had some issues receiving locations when I had location services turned off in OS X, but I am pretty sure there was no error reporting.
You could always get a led box or use some other method to physically block the reception of all signals. Or come to my flat it has a similar effect.
精彩评论