How to simulate a location for watchOS simulator?
using with request
- (void) requestLocation {
locationManager = [CLLocationManager new];
locationManager.delegate = self;
[locationManager requestWhenInUseAuthorization];
[locationManager requestLocation];
}
I always catch an error:
- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error {
// Error here if no location can be found
}
The error is
NSError * domain: @"kCLErrorDomain" - code: 0 0x7a867970
In order to make location detection work in watch simulator, You are required to set the location iPhone simulator as well. i Suggest you to follow steps as
Hope this helps.
Sample code in swift,