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
qiz
source
to share
3 answers
Edit your schema,
- On the Options tab, make sure you check Allow Placement.
- Choose a default location (optional).
- Reset Simulator content and settings. This works for me.
P / S: You may need to restart the Xcode IDE.
+5
haithngn
source
to share
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
qiz
source
to share
Had the same problems in Xcode6 but now it works fine in Xcode 6.1
0
Igor Palaguta
source
to share