Xcode 6 GM cannot simulate location with iOS 8 simulator
I set the location using Xcode's "Simulate Location" button and the iOS simulator "Debug> Location> Custom Location", it doesn't work. And Maps.app cannot get location either.
Of course I am updating the code for iOS 8 CLLocationManager. such as "requestAlwaysAuthorization" and "NSLocationAlwaysUsageDescription"
+3
source to share
3 answers
This is my workaround:
- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
{
[self locationManager:manager didUpdateLocations:@[[[CLLocation alloc] initWithLatitude:<#(CLLocationDegrees)#> longitude:<#(CLLocationDegrees)#>]]];
return;
// Something you should do when Xcode not crazy
}
0
source to share